URL.openConnection()
instead.
Please visit this webpage
for further details.@Deprecated public class BinaryCodec extends java.lang.Object implements BinaryDecoder, BinaryEncoder
Constructor and Description |
---|
BinaryCodec()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
decode(byte[] ascii)
Deprecated.
Decodes a byte array where each byte represents an ascii '0' or '1'.
|
java.lang.Object |
decode(java.lang.Object ascii)
Deprecated.
Decodes a byte array where each byte represents an ascii '0' or '1'.
|
byte[] |
encode(byte[] raw)
Deprecated.
Converts an array of raw binary data into an array of ascii 0 and 1 characters.
|
java.lang.Object |
encode(java.lang.Object raw)
Deprecated.
Converts an array of raw binary data into an array of ascii 0 and 1 chars.
|
static byte[] |
fromAscii(byte[] ascii)
Deprecated.
Decodes a byte array where each byte represents an ascii '0' or '1'.
|
static byte[] |
fromAscii(char[] ascii)
Deprecated.
Decodes a byte array where each char represents an ascii '0' or '1'.
|
static byte[] |
toAsciiBytes(byte[] raw)
Deprecated.
Converts an array of raw binary data into an array of ascii 0 and 1 character bytes - each byte is a truncated
char.
|
static char[] |
toAsciiChars(byte[] raw)
Deprecated.
Converts an array of raw binary data into an array of ascii 0 and 1 characters.
|
static java.lang.String |
toAsciiString(byte[] raw)
Deprecated.
Converts an array of raw binary data into a String of ascii 0 and 1 characters.
|
byte[] |
toByteArray(java.lang.String ascii)
Deprecated.
Decodes a String where each char of the String represents an ascii '0' or '1'.
|
public byte[] encode(byte[] raw)
encode
in interface BinaryEncoder
raw
- the raw binary data to convertBinaryEncoder.encode(byte[])
public java.lang.Object encode(java.lang.Object raw) throws EncoderException
encode
in interface Encoder
raw
- the raw binary data to convertEncoderException
- if the argument is not a byte[]Encoder.encode(java.lang.Object)
public java.lang.Object decode(java.lang.Object ascii) throws DecoderException
decode
in interface Decoder
ascii
- each byte represents an ascii '0' or '1'DecoderException
- if argument is not a byte[], char[] or StringDecoder.decode(java.lang.Object)
public byte[] decode(byte[] ascii)
decode
in interface BinaryDecoder
ascii
- each byte represents an ascii '0' or '1'Decoder.decode(Object)
public byte[] toByteArray(java.lang.String ascii)
ascii
- String of '0' and '1' charactersDecoder.decode(Object)
public static byte[] fromAscii(char[] ascii)
ascii
- each char represents an ascii '0' or '1'public static byte[] fromAscii(byte[] ascii)
ascii
- each byte represents an ascii '0' or '1'public static byte[] toAsciiBytes(byte[] raw)
raw
- the raw binary data to convertBinaryEncoder.encode(byte[])
public static char[] toAsciiChars(byte[] raw)
raw
- the raw binary data to convertBinaryEncoder.encode(byte[])
public static java.lang.String toAsciiString(byte[] raw)
raw
- the raw binary data to convertBinaryEncoder.encode(byte[])