org.ccnx.ccn.io.CCNBlockOutputStream Class Reference

This class acts as a packet-oriented stream of data. More...

List of all members.

Public Member Functions

 CCNBlockOutputStream (ContentName baseName, SignedInfo.ContentType type) throws IOException
 CCNBlockOutputStream (ContentName baseName, SignedInfo.ContentType type, PublisherPublicKeyDigest publisher, CCNHandle handle) throws IOException
 CCNBlockOutputStream (ContentName baseName, SignedInfo.ContentType type, KeyLocator locator, PublisherPublicKeyDigest publisher, ContentKeys keys, CCNFlowControl flowControl) throws IOException
void useByteCountSequenceNumbers ()
void useFixedIncrementSequenceNumbers (int increment)
void useScaledByteCountSequenceNumbers (int scale)
void write (byte[] b, int off, int len) throws IOException

Detailed Description

This class acts as a packet-oriented stream of data.

It might be better implemented as a subclass of DatagramSocket. Given a base name and signing information, it writes content blocks under that base name, where each block is named according to the base name concatenated with a sequence number identifying the specific block.

Each call to write writes one or more individual ContentObjects. The maximum size is given by parameters of the segmenter used; if buffers are larger than that size they are output as multiple fragments.

It does offer flexible content name increment options. The creator can specify an initial block id (default is 0), and an increment (default 1) for fixed-width blocks, or blocks can be identified by byte offset in the running stream, or by another integer metric (e.g. time offset), by supplying a multiplier to convert the byte offset into a metric value. Finally, writers can specify the block identifier with a write. Currently, however, the corresponding reader org.ccnx.ccn.io.CCNBlockInputStream expects sequential segment numbering (and constraints based on the low-level CCN Interest specification may make this difficult to overcome).


The documentation for this class was generated from the following file:
Generated on Fri May 13 16:27:43 2011 for Content-Centric Networking in Java by  doxygen 1.6.3