public static String toStringBinary(ByteBuffer bb){
  return bb == null ? null : toStringBinary(bb.array(),bb.arrayOffset() + bb.position(),bb.remaining());
}

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