org.ccnx.ccn.io.content.CCNStringObject Class Reference
A CCNNetworkObject wrapper around Java Strings, which uses Java serialization to write those strings.
More...
List of all members.
Public Member Functions |
| CCNStringObject (ContentName name, String data, SaveType saveType, CCNHandle handle) throws IOException |
| Write constructor.
|
| CCNStringObject (ContentName name, String data, SaveType saveType, PublisherPublicKeyDigest publisher, KeyLocator locator, CCNHandle handle) throws IOException |
| Write constructor.
|
| CCNStringObject (ContentName name, CCNHandle handle) throws ContentDecodingException, IOException |
| Read constructor.
|
| CCNStringObject (ContentName name, PublisherPublicKeyDigest publisher, CCNHandle handle) throws ContentDecodingException, IOException |
| Read constructor.
|
| CCNStringObject (ContentObject firstBlock, CCNHandle handle) throws ContentDecodingException, IOException |
| Read constructor.
|
| CCNStringObject (ContentName name, String data, PublisherPublicKeyDigest publisher, KeyLocator locator, CCNFlowControl flowControl) throws IOException |
| Internal constructor used by low-level network operations.
|
| CCNStringObject (ContentName name, PublisherPublicKeyDigest publisher, CCNFlowControl flowControl) throws ContentDecodingException, IOException |
| Internal constructor used by low-level network operations.
|
| CCNStringObject (ContentObject firstSegment, CCNFlowControl flowControl) throws ContentDecodingException, IOException |
| Internal constructor used by low-level network operations.
|
String | string () throws ContentNotReadyException, ContentGoneException, ErrorStateException |
Protected Member Functions |
String | readObjectImpl (InputStream input) throws ContentDecodingException, IOException |
void | writeObjectImpl (OutputStream output) throws ContentEncodingException, IOException |
Detailed Description
A CCNNetworkObject wrapper around Java Strings, which uses Java serialization to write those strings.
Allows reading and writing of versioned strings to CCN, and background updating of same. Very useful class for writing simple tests and applications, but requires both communicating partners to speak Java Serialization. See CCNStringObject for a more generally useful string object that serializes the string in pure UTF-8, making something that can be more easily read from other languages.
Constructor & Destructor Documentation
org.ccnx.ccn.io.content.CCNStringObject.CCNStringObject |
( |
ContentName |
name, |
|
|
String |
data, |
|
|
SaveType |
saveType, |
|
|
CCNHandle |
handle | |
|
) |
| | throws IOException |
Write constructor.
Use this constructor with null data to avoid an initial blocking call to update in the constructor, for example if you are going to call updateInBackground.
- Parameters:
-
| name | |
| data | Initial value for data. Can be null; but needs to be set with setData before save is called (or passed as an argument to save). |
| saveType | where this object saves its data to; options include RAW and REPOSITORY |
| handle | |
- Exceptions:
-
Write constructor.
- Parameters:
-
| name | |
| data | |
| saveType | where this object saves its data to; options include RAW and REPOSITORY |
| publisher | |
| locator | |
| handle | |
- Exceptions:
-
Read constructor.
- Parameters:
-
- Exceptions:
-
Read constructor.
- Parameters:
-
- Exceptions:
-
Read constructor.
- Parameters:
-
- Exceptions:
-
Internal constructor used by low-level network operations.
Don't use unless you know what you are doing.
- Parameters:
-
| name | name under which to save data |
| data | data to save when save() is called; or null if the next call will be updateInBackground() |
| publisher | key (identity) to use to sign the content (null for default) |
| locator | key locator to use to tell people where to find our key, should match publisher, (null for default for key) |
| flowControl | flow controller to use for network output |
- Exceptions:
-
Internal constructor used by low-level network operations.
Don't use unless you know what you are doing.
- Parameters:
-
| name | name under which to save data |
| data | data to save when save() is called; or null if the next call will be updateInBackground() |
| publisher | key (identity) to use to sign the content (null for default) |
| locator | key locator to use to tell people where to find our key, should match publisher, (null for default for key) |
| flowControl | flow controller to use for network output |
- Exceptions:
-
Internal constructor used by low-level network operations.
Don't use unless you know what you are doing.
- Parameters:
-
| name | name under which to save data |
| data | data to save when save() is called; or null if the next call will be updateInBackground() |
| publisher | key (identity) to use to sign the content (null for default) |
| locator | key locator to use to tell people where to find our key, should match publisher, (null for default for key) |
| flowControl | flow controller to use for network output |
- Exceptions:
-
The documentation for this class was generated from the following file:
- src/org/ccnx/ccn/io/content/CCNStringObject.java