org.ccnx.ccn.io.content.CCNSerializableObject< E extends Serializable > Class Reference

Subclass of CCNNetworkObject that wraps classes implementing Serializable, and uses Java serialization to read and write those objects to CCN. More...

Inheritance diagram for org.ccnx.ccn.io.content.CCNSerializableObject< E extends Serializable >:

org.ccnx.ccn.io.content.CCNNetworkObject< E > org.ccnx.ccn.io.content.NetworkObject< E > org.ccnx.ccn.CCNContentHandler

List of all members.

Public Member Functions

 CCNSerializableObject (Class< E > type, boolean contentIsMutable, ContentName name, E data, SaveType saveType, CCNHandle handle) throws IOException
 CCNSerializableObject (Class< E > type, boolean contentIsMutable, ContentName name, E data, SaveType saveType, PublisherPublicKeyDigest publisher, KeyLocator keyLocator, CCNHandle handle) throws IOException
 CCNSerializableObject (Class< E > type, boolean contentIsMutable, ContentName name, CCNHandle handle) throws ContentDecodingException, IOException
 CCNSerializableObject (Class< E > type, boolean contentIsMutable, ContentName name, PublisherPublicKeyDigest publisher, CCNHandle handle) throws ContentDecodingException, IOException
 CCNSerializableObject (Class< E > type, boolean contentIsMutable, ContentObject firstBlock, CCNHandle handle) throws ContentDecodingException, IOException

Protected Member Functions

 CCNSerializableObject (Class< E > type, boolean contentIsMutable, ContentName name, E data, PublisherPublicKeyDigest publisher, KeyLocator keyLocator, CCNFlowControl flowControl) throws IOException
 CCNSerializableObject (Class< E > type, boolean contentIsMutable, ContentName name, PublisherPublicKeyDigest publisher, CCNFlowControl flowControl) throws ContentDecodingException, IOException
 CCNSerializableObject (Class< E > type, boolean contentIsMutable, ContentObject firstBlock, CCNFlowControl flowControl) throws ContentDecodingException, IOException
 CCNSerializableObject (Class< E > type, CCNSerializableObject<?extends E > other)
readObjectImpl (InputStream input) throws ContentDecodingException, IOException
 Subclasses override.
void writeObjectImpl (OutputStream output) throws ContentEncodingException, IOException
 Subclasses override.


Detailed Description

Subclass of CCNNetworkObject that wraps classes implementing Serializable, and uses Java serialization to read and write those objects to CCN.

Note that using Java serialization writes Java-specific object headers for all built-in objects that already define serialization formats. Using this as a serialization format for CCN objects works extremely well when those objects will be read and written from Java. If objects will be read or written from languages other than Java, Java serialization may not be the best backing representation.


Member Function Documentation

E org.ccnx.ccn.io.content.CCNSerializableObject< E extends Serializable >.readObjectImpl ( InputStream  input  )  throws ContentDecodingException, IOException [protected, virtual]

Subclasses override.

This implements the actual object read from stream, returning the new object.

Exceptions:
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.CCNSerializableObject< E extends Serializable >.writeObjectImpl ( OutputStream  output  )  throws ContentEncodingException, IOException [protected, virtual]

Subclasses override.

This implements the actual object write. No flush or close necessary.

Parameters:
output the stream to write to
Exceptions:
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 >.


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

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