This input stream expects to do packet-oriented reading of fixed chunks. More...
Public Member Functions | |
CCNBlockInputStream (ContentName baseName) throws IOException | |
CCNBlockInputStream (ContentName baseName, CCNHandle handle) throws IOException | |
CCNBlockInputStream (ContentName baseName, PublisherPublicKeyDigest publisher, CCNHandle handle) throws IOException | |
CCNBlockInputStream (ContentName baseName, Long segmentNumber, CCNHandle handle) throws IOException | |
CCNBlockInputStream (ContentName baseName, Long startingSegmentNumber, PublisherPublicKeyDigest publisher, CCNHandle handle) throws IOException | |
CCNBlockInputStream (ContentName baseName, Long startingSegmentNumber, PublisherPublicKeyDigest publisher, ContentKeys keys, CCNHandle handle) throws IOException | |
CCNBlockInputStream (ContentObject firstSegment, EnumSet< FlagTypes > flags, CCNHandle handle) throws IOException | |
CCNBlockInputStream (ContentObject firstSegment, ContentKeys keys, EnumSet< FlagTypes > flags, CCNHandle handle) throws IOException | |
Protected Member Functions | |
int | readInternal (byte[] buf, int offset, int len) throws IOException |
Implement sequential reads of data quantized into segments. |
This input stream expects to do packet-oriented reading of fixed chunks.
The chunks can be individually signed or authenticated using a Merkle Hash Tree, but read will return when it gets a single block of content, and will not fill buffers across content blocks. This will consume data written by either CCNBlockOutputStream, or by the C program ccnsendchunks. The intent is to read packet-oriented protocols; possibly a better abstraction is to move this to be a subclass of DatagramSocket.
int org.ccnx.ccn.io.CCNBlockInputStream.readInternal | ( | byte[] | buf, | |
int | offset, | |||
int | len | |||
) | throws IOException [protected, virtual] |
Implement sequential reads of data quantized into segments.
Will read the remainder of the current segment on each read(byte[], int, int) call, when a given segment runs out of bytes returns -1. Next read(byte[], int, int) call will retrieve the next segment. Meant for reading complete segments at a time.
Implements org.ccnx.ccn.io.CCNAbstractInputStream.