org.ccnx.ccn.impl.encoding.BinaryXMLEncoder Class Reference

An implementation of XMLEncoder for the Binary (ccnb) codec. More...

List of all members.

Public Member Functions

 BinaryXMLEncoder ()
 Create a BinaryXMLEncoder initialized with the default dictionary obtained from BinaryXMLDictionary.getDefaultDictionary().
 BinaryXMLEncoder (BinaryXMLDictionary dictionary)
 Create a BinaryXMLEncoder initialized with a specified dictionary.
void beginEncoding (OutputStream ostream) throws ContentEncodingException
 Initiates encoding and handles any startup steps, including writing the start document if one is defined for this codec.
void endEncoding () throws ContentEncodingException
 Handles any necessary steps for ending the encoding, including writing the end document if one is defined for this codec.
void writeUString (String utf8Content) throws ContentEncodingException
void writeBlob (byte[] binaryContent) throws ContentEncodingException
void writeBlob (byte[] binaryContent, int offset, int length) throws ContentEncodingException
void writeDateTime (String tag, CCNTime dateTime) throws ContentEncodingException
 Compact binary encoding of time, same as used for versions.
void writeDateTime (long tag, CCNTime dateTime) throws ContentEncodingException
 Compact binary encoding of time, same as used for versions.
void writeStartElement (String tag, TreeMap< String, String > attributes) throws ContentEncodingException
 Writes a start element tag in the format defined by this codec to the stream, together with a set of attributes.
void writeStartElement (long tag, TreeMap< String, String > attributes) throws ContentEncodingException
 Writes a start element tag in the format defined by this codec to the stream, together with a set of attributes.
void writeAttributes (TreeMap< String, String > attributes) throws IOException
void writeEndElement () throws ContentEncodingException
 Writes the end element defined by this codec to the stream.

Detailed Description

An implementation of XMLEncoder for the Binary (ccnb) codec.

See also:
BinaryXMLCodec
XMLEncoder

Constructor & Destructor Documentation

org.ccnx.ccn.impl.encoding.BinaryXMLEncoder.BinaryXMLEncoder ( BinaryXMLDictionary  dictionary  ) 

Create a BinaryXMLEncoder initialized with a specified dictionary.

Parameters:
dictionary the dictionary to use, if null the default dictionary is used.

Member Function Documentation

void org.ccnx.ccn.impl.encoding.BinaryXMLEncoder.beginEncoding ( OutputStream  ostream  )  throws ContentEncodingException

Initiates encoding and handles any startup steps, including writing the start document if one is defined for this codec.

Parameters:
ostream the output stream to encode to
Exceptions:
ContentEncodingException if there is an error encoding or writing the content

Implements org.ccnx.ccn.impl.encoding.XMLEncoder.

void org.ccnx.ccn.impl.encoding.BinaryXMLEncoder.endEncoding (  )  throws ContentEncodingException

Handles any necessary steps for ending the encoding, including writing the end document if one is defined for this codec.

Exceptions:
ContentEncodingException if there is an error encoding or writing the content

Implements org.ccnx.ccn.impl.encoding.XMLEncoder.

void org.ccnx.ccn.impl.encoding.BinaryXMLEncoder.writeDateTime ( long  tag,
CCNTime  dateTime 
) throws ContentEncodingException

Compact binary encoding of time, same as used for versions.

See also:
VersioningProfile

Implements org.ccnx.ccn.impl.encoding.XMLEncoder.

void org.ccnx.ccn.impl.encoding.BinaryXMLEncoder.writeDateTime ( String  tag,
CCNTime  dateTime 
) throws ContentEncodingException

Compact binary encoding of time, same as used for versions.

See also:
VersioningProfile

Implements org.ccnx.ccn.impl.encoding.XMLEncoder.

void org.ccnx.ccn.impl.encoding.BinaryXMLEncoder.writeEndElement (  )  throws ContentEncodingException

Writes the end element defined by this codec to the stream.

Exceptions:
ContentEncodingException if there is an error encoding or writing the content

Implements org.ccnx.ccn.impl.encoding.XMLEncoder.

void org.ccnx.ccn.impl.encoding.BinaryXMLEncoder.writeStartElement ( long  tag,
TreeMap< String, String >  attributes 
) throws ContentEncodingException

Writes a start element tag in the format defined by this codec to the stream, together with a set of attributes.

This does string lookup of the attribute names.

Parameters:
tag the element start tag
attributes the (attribute, value) pairs to write as attributes of the element start tag, if null or empty no attributes are written
Exceptions:
ContentEncodingException if there is an error encoding or writing the content

Implements org.ccnx.ccn.impl.encoding.XMLEncoder.

void org.ccnx.ccn.impl.encoding.BinaryXMLEncoder.writeStartElement ( String  tag,
TreeMap< String, String >  attributes 
) throws ContentEncodingException

Writes a start element tag in the format defined by this codec to the stream, together with a set of attributes.

Parameters:
tag the element start tag
attributes the (attribute, value) pairs to write as attributes of the element start tag, if null or empty no attributes are written
Exceptions:
ContentEncodingException if there is an error encoding or writing the content

Implements org.ccnx.ccn.impl.encoding.XMLEncoder.


The documentation for this class was generated from the following file:
Generated on Fri May 13 16:27:38 2011 for Content-Centric Networking in Java by  doxygen 1.6.3