de.schlichtherle.truezip.rof
Class AbstractReadOnlyFile
java.lang.Object
de.schlichtherle.truezip.rof.AbstractReadOnlyFile
- All Implemented Interfaces:
- ReadOnlyFile, Closeable
- Direct Known Subclasses:
- ByteArrayReadOnlyFile, DecoratingReadOnlyFile
@ThreadSafe
public abstract class AbstractReadOnlyFile
- extends Object
- implements ReadOnlyFile
An abstract read only file which implements the common boilerplate.
- Author:
- Christian Schlichtherle
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractReadOnlyFile
public AbstractReadOnlyFile()
read
public final int read(byte[] b)
throws IOException
- Description copied from interface:
ReadOnlyFile
- Equivalent to
read(b, 0, b.length).
- Specified by:
read in interface ReadOnlyFile
- Throws:
IOException
readFully
public final void readFully(byte[] b)
throws IOException
- Description copied from interface:
ReadOnlyFile
- Equivalent to
readFully(b, 0, b.length).
- Specified by:
readFully in interface ReadOnlyFile
- Throws:
IOException
readFully
public final void readFully(byte[] buf,
int off,
int len)
throws IOException
- Description copied from interface:
ReadOnlyFile
- Reads
len bytes into the given buffer at the given position.
- Specified by:
readFully in interface ReadOnlyFile
- Parameters:
buf - The buffer to fill with data.off - The start offset of the data.len - The number of bytes to read.
- Throws:
IOException - On any I/O related issue.
Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.