org.ccnx.ccn.impl.repo.RandomAccessInputStream Class Reference
RandomAccessInputStream extends InputStream to allow random reads of the backend repository RandomAccessFile.
More...
List of all members.
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 |
Detailed Description
RandomAccessInputStream extends InputStream to allow random reads of the backend repository RandomAccessFile.
This class is intended for backend repository use and is not meant for general CCN stream use.
- See also:
- InputStream
-
RandomAccessFile
Constructor & Destructor Documentation
org.ccnx.ccn.impl.repo.RandomAccessInputStream.RandomAccessInputStream |
( |
RandomAccessFile |
f |
) |
|
Constructor to set the backend repository file for random reads.
- Parameters:
-
| f | Backend RandomAccessFile |
Member Function Documentation
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.
- Parameters:
-
| b | byte[] to read bytes into |
| off | starting position for reading |
| len | number of bytes to read into the byte array |
- Returns:
- int number of bytes read into the byte array
- Exceptions:
-
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.
- Parameters:
-
| b | byte[] to read data into |
- Returns:
- int Number of bytes read (-1 if no more data is available)
- Exceptions:
-
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.
- Returns:
- int Next byte of the file
- See also:
- InputStream.read()
- Exceptions:
-
The documentation for this class was generated from the following file:
- src/org/ccnx/ccn/impl/repo/RandomAccessInputStream.java