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...
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. | |
E | readObjectImpl (InputStream input) throws ContentDecodingException, IOException |
Subclasses override. |
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.
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.
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.
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 >.