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

This class contains methods for content encoding/decoding common to all or many codecs. More...

List of all members.

Public Member Functions

 GenericXMLEncoder (BinaryXMLDictionary dictionary)
void writeStartElement (String tag) throws ContentEncodingException
 Writes a start element tag in the format defined by this codec to the stream.
void writeStartElement (long tag) throws ContentEncodingException
 Writes a start element tag in the format defined by this codec to the stream.
void writeElement (String tag, String utf8Content) throws ContentEncodingException
 Writes a UTF-8 encoded string to the stream formatted according to this codec.
void writeElement (long tag, String utf8Content) throws ContentEncodingException
 Writes a UTF-8 encoded string to the stream formatted according to this codec.
void writeElement (String tag, String utf8Content, TreeMap< String, String > attributes) throws ContentEncodingException
 Writes a UTF-8 encoded string to the stream formatted according to this codec.
void writeElement (long tag, String utf8Content, TreeMap< String, String > attributes) throws ContentEncodingException
 Writes a UTF-8 encoded string to the stream formatted according to this codec.
void writeElement (String tag, byte[] binaryContent) throws ContentEncodingException
 Writes a binary element to the stream formatted according to this codec.
void writeElement (long tag, byte[] binaryContent) throws ContentEncodingException
 Writes a binary element to the stream formatted according to this codec.
void writeElement (String tag, byte[] binaryContent, int offset, int length) throws ContentEncodingException
 Writes a binary element to the stream formatted according to this codec.
void writeElement (long tag, byte[] binaryContent, int offset, int length) throws ContentEncodingException
 Writes a binary element to the stream formatted according to this codec.
void writeElement (String tag, byte[] binaryContent, TreeMap< String, String > attributes) throws ContentEncodingException
 Writes a binary element to the stream formatted according to this codec.
void writeElement (long tag, byte[] binaryContent, TreeMap< String, String > attributes) throws ContentEncodingException
 Writes a binary element to the stream formatted according to this codec.
void writeElement (String tag, byte[] binaryContent, int offset, int length, TreeMap< String, String > attributes) throws ContentEncodingException
 Writes a binary element to the stream formatted according to this codec.
void writeElement (long tag, byte[] binaryContent, int offset, int length, TreeMap< String, String > attributes) throws ContentEncodingException
 Writes a binary element to the stream formatted according to this codec.
void writeElement (String tag, long value) throws ContentEncodingException
 Writes a number to the stream formatted according to this codec.
void writeElement (long tag, long value) throws ContentEncodingException
 Writes a number to the stream formatted according to this codec.

Protected Attributes

OutputStream _ostream = null

Detailed Description

This class contains methods for content encoding/decoding common to all or many codecs.


Member Function Documentation

void org.ccnx.ccn.impl.encoding.GenericXMLEncoder.writeElement ( long  tag,
long  value 
) throws ContentEncodingException

Writes a number to the stream formatted according to this codec.

Parameters:
tag start tag to use
value the number to encode
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.GenericXMLEncoder.writeElement ( String  tag,
long  value 
) throws ContentEncodingException

Writes a number to the stream formatted according to this codec.

Parameters:
tag start tag to use
value the number to encode
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.GenericXMLEncoder.writeElement ( long  tag,
byte[]  binaryContent,
int  offset,
int  length,
TreeMap< String, String >  attributes 
) throws ContentEncodingException

Writes a binary element to the stream formatted according to this codec.

Parameters:
tag start tag to use
binaryContent the binary data to encode
offset the offset into binaryContent at which to start
length the number of bytes of binaryContent to encode
attributes the XML attributes to add to this tag
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.GenericXMLEncoder.writeElement ( String  tag,
byte[]  binaryContent,
int  offset,
int  length,
TreeMap< String, String >  attributes 
) throws ContentEncodingException

Writes a binary element to the stream formatted according to this codec.

Parameters:
tag start tag to use
binaryContent the binary data to encode
offset the offset into binaryContent at which to start
length the number of bytes of binaryContent to encode
attributes the XML attributes to add to this tag
Exceptions:
ContentEncodingException if there is an error encoding or writing the content

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

Reimplemented in org.ccnx.ccn.impl.encoding.TextXMLEncoder.

void org.ccnx.ccn.impl.encoding.GenericXMLEncoder.writeElement ( long  tag,
byte[]  binaryContent,
TreeMap< String, String >  attributes 
) throws ContentEncodingException

Writes a binary element to the stream formatted according to this codec.

Parameters:
tag start tag to use
binaryContent the binary data to encode
attributes the XML attributes to add to this tag
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.GenericXMLEncoder.writeElement ( String  tag,
byte[]  binaryContent,
TreeMap< String, String >  attributes 
) throws ContentEncodingException

Writes a binary element to the stream formatted according to this codec.

Parameters:
tag start tag to use
binaryContent the binary data to encode
attributes the XML attributes to add to this tag
Exceptions:
ContentEncodingException if there is an error encoding or writing the content

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

Reimplemented in org.ccnx.ccn.impl.encoding.TextXMLEncoder.

void org.ccnx.ccn.impl.encoding.GenericXMLEncoder.writeElement ( long  tag,
byte[]  binaryContent,
int  offset,
int  length 
) throws ContentEncodingException

Writes a binary element to the stream formatted according to this codec.

Parameters:
tag start tag to use
binaryContent the binary data to encode
offset the offset into binaryContent at which to start
length the number of bytes of binaryContent to encode
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.GenericXMLEncoder.writeElement ( String  tag,
byte[]  binaryContent,
int  offset,
int  length 
) throws ContentEncodingException

Writes a binary element to the stream formatted according to this codec.

Parameters:
tag start tag to use
binaryContent the binary data to encode
offset the offset into binaryContent at which to start
length the number of bytes of binaryContent to encode
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.GenericXMLEncoder.writeElement ( long  tag,
byte[]  binaryContent 
) throws ContentEncodingException

Writes a binary element to the stream formatted according to this codec.

Parameters:
tag start tag to use
binaryContent the binary data to encode
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.GenericXMLEncoder.writeElement ( String  tag,
byte[]  binaryContent 
) throws ContentEncodingException

Writes a binary element to the stream formatted according to this codec.

Parameters:
tag start tag to use
binaryContent the binary data to encode
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.GenericXMLEncoder.writeElement ( long  tag,
String  utf8Content,
TreeMap< String, String >  attributes 
) throws ContentEncodingException

Writes a UTF-8 encoded string to the stream formatted according to this codec.

Parameters:
tag start tag to use
utf8Content the string data to encode
attributes the XML attributes to add to this tag
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.GenericXMLEncoder.writeElement ( String  tag,
String  utf8Content,
TreeMap< String, String >  attributes 
) throws ContentEncodingException

Writes a UTF-8 encoded string to the stream formatted according to this codec.

Parameters:
tag start tag to use
utf8Content the string data to encode
attributes the XML attributes to add to this tag
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.GenericXMLEncoder.writeElement ( long  tag,
String  utf8Content 
) throws ContentEncodingException

Writes a UTF-8 encoded string to the stream formatted according to this codec.

Parameters:
tag start tag to use
utf8Content the string data to encode
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.GenericXMLEncoder.writeElement ( String  tag,
String  utf8Content 
) throws ContentEncodingException

Writes a UTF-8 encoded string to the stream formatted according to this codec.

Parameters:
tag start tag to use
utf8Content the string data to encode
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.GenericXMLEncoder.writeStartElement ( long  tag  )  throws ContentEncodingException

Writes a start element tag in the format defined by this codec to the stream.

Parameters:
tag the element start tag value defined by the dictionary, to skip string processing.
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.GenericXMLEncoder.writeStartElement ( String  tag  )  throws ContentEncodingException

Writes a start element tag in the format defined by this codec to the stream.

Parameters:
tag the element start tag
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