public static int encode ( byte [ ] value , int valueOffset , int valueLength , byte [ ] dst , int dstOffset ) { return encode ( value , valueOffset , valueLength , dst , dstOffset , 0 ) ; }
Encodes the given optional unsigned byte array into a variable amount of bytes . If the byte array is null exactly 1 byte is written . Otherwise the amount written can be determined by calling calculateEncodedLength .