org.ccnx.ccn.io.CCNBlockInputStream Class Reference

This input stream expects to do packet-oriented reading of fixed chunks. More...

Inheritance diagram for org.ccnx.ccn.io.CCNBlockInputStream:

org.ccnx.ccn.io.CCNAbstractInputStream org.ccnx.ccn.CCNContentHandler

List of all members.

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.


Detailed Description

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.


Member Function Documentation

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.


The documentation for this class was generated from the following file:

Generated on Thu Feb 16 00:45:00 2012 for Content-Centric Networking in Java by  doxygen 1.5.6