@NotThreadSafe public abstract class AbstractReadOnlyFile extends Object implements ReadOnlyFile
| Constructor and Description |
|---|
AbstractReadOnlyFile() |
| Modifier and Type | Method and Description |
|---|---|
int |
read(byte[] b)
Equivalent to
read(b, 0, b.length). |
void |
readFully(byte[] b)
Equivalent to
readFully(b, 0, b.length). |
void |
readFully(byte[] buf,
int off,
int len)
Reads
len bytes into the given buffer at the given position. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getFilePointer, length, read, read, seekpublic final int read(byte[] b)
throws IOException
ReadOnlyFileread(b, 0, b.length).read in interface ReadOnlyFileb - The buffer to fill with data.-1 if there is
no more data because the end of the file has been reached.IOException - On any I/O failure.public final void readFully(byte[] b)
throws IOException
ReadOnlyFilereadFully(b, 0, b.length).readFully in interface ReadOnlyFileb - the buffer to fill with data.EOFException - If less than len bytes are available
before the end of the file is reached.IOException - On any I/O failure.public void readFully(byte[] buf,
int off,
int len)
throws IOException
ReadOnlyFilelen bytes into the given buffer at the given position.readFully in interface ReadOnlyFilebuf - the buffer to fill with data.off - the start offset of the data.len - the number of bytes to read.EOFException - If less than len bytes are available
before the end of the file is reached.IOException - On any I/O failure.Copyright © 2005-2013 Schlichtherle IT Services. All Rights Reserved.