org.ccnx.ccn.io.content.EncodableObject< E extends XMLEncodable > Class Reference

Subclass of NetworkObject that wraps classes implementing XMLEncodable, and uses XMLEncodable's encode() and decode() methods to read and write those objects to an OutputStream. More...

List of all members.

Public Member Functions

 EncodableObject (Class< E > type, boolean contentIsMutable)
 EncodableObject (Class< E > type, boolean contentIsMutable, E data)

Protected Member Functions

void writeObjectImpl (OutputStream output) throws ContentEncodingException, IOException
 Subclasses override.
readObjectImpl (InputStream input) throws ContentDecodingException, IOException
 Subclasses override.

Detailed Description

Subclass of NetworkObject that wraps classes implementing XMLEncodable, and uses XMLEncodable's encode() and decode() methods to read and write those objects to an OutputStream.

Not CCN-specific, the CCN variant of this is CCNEncodableObject.


Member Function Documentation

E org.ccnx.ccn.io.content.EncodableObject< 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.

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.EncodableObject< E extends XMLEncodable >.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 Fri May 13 16:27:45 2011 for Content-Centric Networking in Java by  doxygen 1.6.3