|
Last change
on this file was 36483, checked in by stoecker, 5 months ago |
|
set eol-style, fix checkstyle issues, add ignores
|
-
Property svn:eol-style
set to
native
|
|
File size:
553 bytes
|
| Line | |
|---|
| 1 | package org.j7zip.Common;
|
|---|
| 2 |
|
|---|
| 3 | import org.j7zip.SevenZip.IInStream;
|
|---|
| 4 |
|
|---|
| 5 | public class LockedInStream {
|
|---|
| 6 | IInStream _stream;
|
|---|
| 7 |
|
|---|
| 8 | public LockedInStream() {
|
|---|
| 9 | }
|
|---|
| 10 |
|
|---|
| 11 | public void Init(IInStream stream) {
|
|---|
| 12 | _stream = stream;
|
|---|
| 13 | }
|
|---|
| 14 |
|
|---|
| 15 | public synchronized int read(long startPos, byte [] data, int off, int size) throws java.io.IOException {
|
|---|
| 16 | // NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection);
|
|---|
| 17 | _stream.Seek(startPos, IInStream.STREAM_SEEK_SET);
|
|---|
| 18 | return _stream.read(data,off, size);
|
|---|
| 19 | }
|
|---|
| 20 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.