Package com.opencloud.rhino.cmp.codecs
Class SimpleDatatypeCodecs.ByteCodec
- java.lang.Object
-
- com.opencloud.rhino.cmp.codecs.SimpleDatatypeCodecs.ByteCodec
-
- All Implemented Interfaces:
DatatypeCodec<Byte>
- Enclosing class:
- SimpleDatatypeCodecs
public static class SimpleDatatypeCodecs.ByteCodec extends Object implements DatatypeCodec<Byte>
Datatype codec for
Byte.- Since:
- Rhino 2.4.0
-
-
Constructor Summary
Constructors Constructor Description ByteCodec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Bytedecode(DataInput in, ClassLoader cl, DecoderUtils utils)Decode a value from the given data input stream.voidencode(Byte value, DataOutput out, EncoderUtils utils)Encode the specified value to the given data output stream.
-
-
-
Method Detail
-
encode
public void encode(Byte value, DataOutput out, EncoderUtils utils) throws IOException
Description copied from interface:DatatypeCodecEncode the specified value to the given data output stream.
- Specified by:
encodein interfaceDatatypeCodec<Byte>- Parameters:
value- the value to encode. This will never benull.out- the data output stream to encode the value to.utils- additional utility encoding functions that may be useful to the codec.- Throws:
IOException- if an I/O error occurs.
-
decode
public Byte decode(DataInput in, ClassLoader cl, DecoderUtils utils) throws IOException
Description copied from interface:DatatypeCodecDecode a value from the given data input stream.
- Specified by:
decodein interfaceDatatypeCodec<Byte>- Parameters:
in- the data input stream to decode the value from.cl- a classloader which can be used to load classes necessary to decode the value.utils- additional utility decoding functions that may be useful to the codec.- Returns:
- the decoded value.
- Throws:
IOException- if an I/O error occurs.
-
-