|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.neu.ccs.codec.EscapedCodec
implementation
whose encoding scheme uses separator sequences
to separate distinct data elements
and uses escape sequences to mask separator sequences
and escape sequences at each level of recursion.
This CODEC does not make use of data compression,
and does not result in any data loss.
This CODEC produces encoded data
that is extremely readable at low levels of recursion,
but is very difficult to read at high levels
of recursion.CODEC
The unique three letter identifier
for this CODEC is "ESC".
This CODEC is automatically installed by the JPT.
CodecUtilities,
Serialized Form| Constructor Summary | |
EscapedCodec()
Constructs an object capable of encoding and decoding data using the "Escaped-separated" encoding scheme. |
|
| Method Summary | |
String[] |
decode(String data)
Decodes the given compound data String
into an array of data Strings
using the "Escaped-separated" encoding scheme. |
String |
encode(String[] data)
Encodes the given array of data Strings
into a single compound data String
using the "Escaped-separated" encoding scheme. |
String |
getPrefix()
Returns the unique identifier for this encoding scheme: the String "ESC". |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EscapedCodec()
| Method Detail |
public String encode(String[] data)
Strings
into a single compound data String
using the "Escaped-separated" encoding scheme.
If the given array is null,
a representation of null is returned.
encode in interface Codecdata - an array of data Strings
Stringdecode(String),
CodecUtilities.encode(String[]),
CodecUtilities.encode(Stringable[]),
Codec
public String[] decode(String data)
throws ParseException
String
into an array of data Strings
using the "Escaped-separated" encoding scheme.
If the given data is null
or the representation of null,
this method returns null.
decode in interface Codecdata - an encoded data String
Strings
ParseException - if the data was not encoded
using this schemeencode(String[]),
CodecUtilities.decode(String),
Codecpublic String getPrefix()
String "ESC".
getPrefix in interface CodecCodecUtilities.installCodec(Codec),
CodecUtilities.getDefaultCodec(),
Codec
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||