question: public static String toStringBinary ( ByteBuffer bb ) { return bb == null ? null : toStringBinary ( bb . array ( ) , bb . arrayOffset ( ) + bb . position ( ) , bb . remaining ( ) ) ; }
target:  Write a printable representation of a ByteBuffer. Non-printable characters are hex escaped in the format \\x%02X, eg: \x00 \x05 etc