de.schlichtherle.truezip.fs
Class FsStatistics.CountingReadOnlyFile
java.lang.Object
de.schlichtherle.truezip.rof.AbstractReadOnlyFile
de.schlichtherle.truezip.rof.DecoratingReadOnlyFile
de.schlichtherle.truezip.fs.FsStatistics.CountingReadOnlyFile
- All Implemented Interfaces:
- ReadOnlyFile, Closeable
- Enclosing class:
- FsStatistics
@NotThreadSafe
private final class FsStatistics.CountingReadOnlyFile
- extends DecoratingReadOnlyFile
|
Method Summary |
int |
read()
Reads and returns the next byte or -1 if the end of the file has been
reached. |
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from this read only file into
the given array. |
FsStatistics.CountingReadOnlyFile
FsStatistics.CountingReadOnlyFile(ReadOnlyFile rof)
read
public int read()
throws IOException
- Description copied from interface:
ReadOnlyFile
- Reads and returns the next byte or -1 if the end of the file has been
reached.
- Specified by:
read in interface ReadOnlyFile- Overrides:
read in class DecoratingReadOnlyFile
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Description copied from interface:
ReadOnlyFile
- Reads up to
len bytes of data from this read only file into
the given array.
This method blocks until at least one byte of input is available.
- Specified by:
read in interface ReadOnlyFile- Overrides:
read in class DecoratingReadOnlyFile
- Parameters:
b - The buffer to fill with data.off - The start offset of the data.len - The maximum number of bytes to read.
- Returns:
- The total number of bytes read, or
-1 if there is
no more data because the end of the file has been reached.
- Throws:
IOException - On any I/O related issue.
Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.