Provides persistence for classes implementing XMLEncodable using a CCN network to store/load the data. More...
Public Member Functions | |
CCNEncodableObject (Class< E > type, boolean contentIsMutable, ContentName name, E data, SaveType saveType, CCNHandle handle) throws IOException | |
CCNEncodableObject (Class< E > type, boolean contentIsMutable, ContentName name, E data, SaveType saveType, PublisherPublicKeyDigest publisher, KeyLocator keyLocator, CCNHandle handle) throws IOException | |
CCNEncodableObject (Class< E > type, boolean contentIsMutable, ContentName name, CCNHandle handle) throws ContentDecodingException, IOException | |
CCNEncodableObject (Class< E > type, boolean contentIsMutable, ContentName name, PublisherPublicKeyDigest publisher, CCNHandle handle) throws ContentDecodingException, IOException | |
CCNEncodableObject (Class< E > type, boolean contentIsMutable, ContentObject firstBlock, CCNHandle handle) throws ContentDecodingException, IOException | |
Protected Member Functions | |
CCNEncodableObject (Class< E > type, boolean contentIsMutable, ContentName name, E data, PublisherPublicKeyDigest publisher, KeyLocator keyLocator, CCNFlowControl flowControl) throws IOException | |
CCNEncodableObject (Class< E > type, boolean contentIsMutable, ContentName name, PublisherPublicKeyDigest publisher, CCNFlowControl flowControl) throws ContentDecodingException, IOException | |
CCNEncodableObject (Class< E > type, boolean contentIsMutable, ContentObject firstBlock, CCNFlowControl flowControl) throws ContentDecodingException, IOException | |
CCNEncodableObject (Class< E > type, CCNEncodableObject<?extends E > other) | |
E | readObjectImpl (InputStream input) throws ContentDecodingException, IOException |
Subclasses override. | |
void | writeObjectImpl (OutputStream output) throws ContentEncodingException, IOException |
Subclasses override. |
Provides persistence for classes implementing XMLEncodable using a CCN network to store/load the data.
This is similar to the Data Access Object pattern.
The data supplier (class implementing XMLEncodable's encode() and decode() methods) is called to read and write those objects to CCN.
E org.ccnx.ccn.io.content.CCNEncodableObject< E extends XMLEncodable >.readObjectImpl | ( | InputStream | input | ) | throws ContentDecodingException, IOException [protected, virtual] |
Subclasses override.
This implements the actual object read from stream, returning the new object.
ContentDecodingException | if there is an error decoding the object | |
IOException | if there is an error actually reading the data |
Implements org.ccnx.ccn.io.content.NetworkObject< E >.
void org.ccnx.ccn.io.content.CCNEncodableObject< E extends XMLEncodable >.writeObjectImpl | ( | OutputStream | output | ) | throws ContentEncodingException, IOException [protected, virtual] |
Subclasses override.
This implements the actual object write. No flush or close necessary.
output | the stream to write to |
ContentEncodingException | if there is an error encoding the object | |
IOException | if there is an error writing it to the network |
Implements org.ccnx.ccn.io.content.NetworkObject< E >.