public class NoOpTextCoder extends CoderAdapter implements Decoder.Text<String>, Encoder.Text<String>
Decoder.Binary<T>, Decoder.BinaryStream<T>, Decoder.Text<T>, Decoder.TextStream<T>Encoder.Binary<T>, Encoder.BinaryStream<T>, Encoder.Text<T>, Encoder.TextStream<T>| Constructor and Description |
|---|
NoOpTextCoder() |
| Modifier and Type | Method and Description |
|---|---|
String |
decode(String s)
Decode the given String into an object of type T.
|
String |
encode(String object)
Encode the given object into a String.
|
boolean |
willDecode(String s)
Answer whether the given String can be decoded into an object of type T.
|
destroy, initpublic boolean willDecode(String s)
Decoder.TextwillDecode in interface Decoder.Text<String>s - the string being tested for decodability.public String decode(String s) throws DecodeException
Decoder.Textdecode in interface Decoder.Text<String>s - string to be decoded.DecodeException - If the provided string cannot be decoded to type Tpublic String encode(String object) throws EncodeException
Encoder.Textencode in interface Encoder.Text<String>object - the object being encoded.EncodeException - The provided object could not be encoded as a stringCopyright © 2012–2019 Oracle Corporation. All rights reserved.