|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.neu.ccs.codec.CountPrefixCodec
implementation
whose encoding scheme prefixes data
with character and element counts.
This CODEC does not make use of data compression,
and does not result in any data loss.
This CODEC produces encoded data
that is easily readable at low levels of recursion,
but is often difficult to read at high levels
of recursion.CODEC
The unique three letter identifier
for this CODEC is "CPC".
This CODEC is automatically installed by the JPT,
and is the deafult CODEC for use with the JPT.
CodecUtilities,
Serialized Form| Constructor Summary | |
CountPrefixCodec()
Constructs an object capable of encoding and decoding data using the "Count-prefix" encoding scheme. |
|
| Method Summary | |
String[] |
decode(String data)
Decodes the given compound data String
into an array of data Strings
using the "Count-prefix" encoding scheme. |
String |
encode(String[] data)
Encodes the given array of data Strings
into a single compound data String
using the "Count-prefix" encoding scheme. |
String |
getPrefix()
Returns the unique identifier for this encoding scheme: the String "CPC". |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CountPrefixCodec()
| Method Detail |
public String encode(String[] data)
Strings
into a single compound data String
using the "Count-prefix" encoding scheme.
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 "Count-prefix" encoding scheme.
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 "CPC".
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 | |||||||||