ahc.util.bytes
Class StringEndEncoding
java.lang.Object
|
+--ahc.util.bytes.StringEndEncoding
- public abstract class StringEndEncoding
- extends java.lang.Object
This class represents ways to encode the length of a string. Three standard implementations are provided
as public static final references.
- Author:
- Arno Haase
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
END_NONE
public static final StringEndEncoding END_NONE
- The length of the string is not encoded at all.
END_NULL
public static final StringEndEncoding END_NULL
- The length of the string is encoded as a trailing zero byte.
END_LEN_PREFIX_16_HILO
public static final StringEndEncoding END_LEN_PREFIX_16_HILO
- The length of the string (in bytes) is encoded as a prefixed 16-bit value in hi-lo.
StringEndEncoding
public StringEndEncoding()
addLenEncoding
public abstract byte[] addLenEncoding(byte[] raw)