public static byte [ ] encodeSingleDesc ( byte [ ] value , int prefixPadding , int suffixPadding ) { int length = value . length ; if ( prefixPadding <= 0 && suffixPadding <= 0 && length == 0 ) { return value ; } byte [ ] dst = new byte [ prefixPadding + length + suffixPadding ] ; while ( -- length >= 0 ) { dst [ prefixPadding + length ] = ( byte ) ( ~ value [ length ] ) ; } return dst ; }
Encodes the given byte array for use when there is only a single required property descending order whose type is a byte array . The original byte array is returned if the length and padding lengths are zero .