Inherits java::io::InputStream.
Public Member Functions | |
RandomAccessInputStream (RandomAccessFile f) | |
Constructor to set the backend repository file for random reads. | |
int | read () throws IOException |
Method to implement the read() method for the abstract class InputStream. | |
int | read (byte[] b) throws IOException |
Method to read some number of bytes into the byte[] b. | |
int | read (byte[] b, int off, int len) throws IOException |
Method to read len bytes into byte[] b starting at a specific offset. | |
Protected Attributes | |
RandomAccessFile | underlying |
This class is intended for backend repository use and is not meant for general CCN stream use.
RandomAccessFile
org.ccnx.ccn.impl.repo.RandomAccessInputStream.RandomAccessInputStream | ( | RandomAccessFile | f | ) |
Constructor to set the backend repository file for random reads.
f | Backend RandomAccessFile |
int org.ccnx.ccn.impl.repo.RandomAccessInputStream.read | ( | ) | throws IOException |
Method to implement the read() method for the abstract class InputStream.
When called, this method returns the next byte of the file.
IOException |
int org.ccnx.ccn.impl.repo.RandomAccessInputStream.read | ( | byte[] | b | ) | throws IOException |
Method to read some number of bytes into the byte[] b.
The number of bytes read is returned as an integer. If no bytes are read, the method returns -1.
b | byte[] to read data into |
IOException |
int org.ccnx.ccn.impl.repo.RandomAccessInputStream.read | ( | byte[] | b, | |
int | off, | |||
int | len | |||
) | throws IOException |
Method to read len bytes into byte[] b starting at a specific offset.
b | byte[] to read bytes into | |
off | starting position for reading | |
len | number of bytes to read into the byte array |
IOException |