org.ccnx.ccn.io.CCNAbstractOutputStream Class Reference
This abstract class is the superclass of all classes for writing an output stream of bytes segmented and stored in CCN.
More...
List of all members.
Detailed Description
This abstract class is the superclass of all classes for writing an output stream of bytes segmented and stored in CCN.
- See also:
- SegmentationProfile for description of CCN segmentation
Constructor & Destructor Documentation
Base constructor for all output streams.
The behavior of an output stream derived class is determined largely by its buffering, segmentation configuration (embodied in a CCNSegmenter) and flow control (embodied in a CCNFlowControl, contained within the segmenter), as well as the way it constructs is names.
- Parameters:
-
| baseName | specifies the base name to write. Can be null, and set later. |
| type | specifies the type of data to write. |
| locator | the key locator to be used in written segments. If null, default is used. |
| publisher | the key with which to sign the output. If null, default for user is used. |
| segmenter | The segmenter used to construct and sign output segments, specified by subclasses to provide various kinds of behavior. |
Member Function Documentation
void org.ccnx.ccn.io.CCNAbstractOutputStream.addOutstandingInterest |
( |
Interest |
outstandingInterest |
) |
|
Method for streams used by CCNFilterListeners to output a block in response to an Interest callback.
We've received an Interest prior to setting up this stream. Use a method to push this Interest, rather than passing it in in the constructor to make sure we have completed initializing the stream, and to limit the number of constructor types. (If the Interest doesn't match this stream's content, no initial block will be output; the stream will wait for matching Interests prior to writing its blocks.)
- Parameters:
-
| outstandingInterest | An interest received prior to constructing this stream, ideally on the same CCNHandle that the stream is using for output. Only one stream should attempt to put() a block in response to this Interest; it is up to the caller to make sure that is the case. |
Long org.ccnx.ccn.io.CCNAbstractOutputStream.firstSegmentNumber |
( |
|
) |
|
Returns the first segment number for this stream.
- Returns:
- The index of the first segment of stream data or null if no segments generated yet.
ContentName org.ccnx.ccn.io.CCNAbstractOutputStream.getBaseName |
( |
|
) |
|
- Returns:
- The name used as a prefix for segments of this stream (not including the segment number).
byte [] org.ccnx.ccn.io.CCNAbstractOutputStream.getFirstDigest |
( |
|
) |
|
Returns the digest of the first segment of this stream.
- Returns:
- The digest of the first segment of this stream or null if no segments generated yet.
ContentObject org.ccnx.ccn.io.CCNAbstractOutputStream.getFirstSegment |
( |
|
) |
|
Return the first segment of this stream.
- Returns:
- The first segment of this stream or null if no segments generated yet
CCNSegmenter org.ccnx.ccn.io.CCNAbstractOutputStream.getSegmenter |
( |
|
) |
[protected] |
- Returns:
- The CCNSegmenter responsible for segmenting and signing stream content.
CCNTime org.ccnx.ccn.io.CCNAbstractOutputStream.getVersion |
( |
|
) |
|
- Returns:
- The version of the stream being written, if its name is versioned.
void org.ccnx.ccn.io.CCNAbstractOutputStream.setTimeout |
( |
int |
timeout |
) |
|
Set the timeout that will be used for all content writes on this stream.
Default is 10 seconds
- Parameters:
-
void org.ccnx.ccn.io.CCNAbstractOutputStream.startWrite |
( |
|
) |
throws IOException [protected] |
The documentation for this class was generated from the following file:
- src/org/ccnx/ccn/io/CCNAbstractOutputStream.java