Public Types | |
enum | OpenMode { O_RDONLY, O_WRONLY } |
enum | SeekWhence { SEEK_SET, SEEK_CUR, SEEK_END } |
Public Member Functions | |
CCNDescriptor (ContentName name, PublisherPublicKeyDigest publisher, CCNHandle handle, boolean openForWriting) throws IOException | |
Open a new descriptor for reading or writing (but not both). | |
int | available () throws IOException |
boolean | openForReading () |
boolean | openForWriting () |
void | close () throws IOException |
Close underlying stream. | |
void | flush () throws IOException |
Flush output stream if open for writing. | |
boolean | eof () |
int | read (byte[] buf, int offset, int len) throws IOException |
See CCNInputStream.read(byte[], int, int). | |
int | read (byte[] b) throws IOException |
See CCNInputStream.read(byte[]). | |
void | write (byte[] buf, int offset, int len) throws IOException |
See CCNOutputStream.writeToNetwork(byte[], long, long). | |
void | setTimeout (int timeout) |
Sets the timeout for the underlying stream. | |
Protected Member Functions | |
void | openForReading (ContentName name, PublisherPublicKeyDigest publisher, CCNHandle handle) throws IOException |
void | openForWriting (ContentName name, PublisherPublicKeyDigest publisher, CCNHandle handle) throws IOException |
Protected Attributes | |
CCNInputStream | _input = null |
CCNOutputStream | _output = null |
org.ccnx.ccn.io.CCNDescriptor.CCNDescriptor | ( | ContentName | name, | |
PublisherPublicKeyDigest | publisher, | |||
CCNHandle | handle, | |||
boolean | openForWriting | |||
) | throws IOException |
Open a new descriptor for reading or writing (but not both).
name | see CCNVersionedInputStream for specification | |
publisher | see CCNVersionedInputStream for specification | |
handle | see CCNVersionedInputStream for specification | |
openForWriting | if true, open an output stream. Otherwise open an input stream. |
IOException |
int org.ccnx.ccn.io.CCNDescriptor.available | ( | ) | throws IOException |
IOException |
boolean org.ccnx.ccn.io.CCNDescriptor.openForReading | ( | ) |
boolean org.ccnx.ccn.io.CCNDescriptor.openForWriting | ( | ) |
void org.ccnx.ccn.io.CCNDescriptor.close | ( | ) | throws IOException |
Close underlying stream.
IOException |
void org.ccnx.ccn.io.CCNDescriptor.flush | ( | ) | throws IOException |
Flush output stream if open for writing.
IOException |
boolean org.ccnx.ccn.io.CCNDescriptor.eof | ( | ) |
void org.ccnx.ccn.io.CCNDescriptor.setTimeout | ( | int | timeout | ) |
Sets the timeout for the underlying stream.
timeout | in msec |