Public Member Functions | |
BinaryXMLEncoder () | |
Create a BinaryXMLEncoder initialized with the default dictionary obtained from BinaryXMLDictionary.getDefaultDictionary(). | |
BinaryXMLEncoder (XMLDictionary 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. |
org.ccnx.ccn.impl.encoding.BinaryXMLEncoder.BinaryXMLEncoder | ( | XMLDictionary | dictionary | ) |
Create a BinaryXMLEncoder initialized with a specified dictionary.
dictionary | the dictionary to use, if null the default dictionary is used. |
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.
ostream | the output stream to encode to |
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.
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 | ( | String | tag, | |
CCNTime | dateTime | |||
) | throws ContentEncodingException |
Compact binary encoding of time, same as used for versions.
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.
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.
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 |
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.
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 |
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.writeEndElement | ( | ) | throws ContentEncodingException |
Writes the end element defined by this codec to the stream.
ContentEncodingException | if there is an error encoding or writing the content |
Implements org.ccnx.ccn.impl.encoding.XMLEncoder.