public static void srs_print_bytes(String tag,ByteBuffer bb,int size){
  StringBuilder sb=new StringBuilder();
  int i=0;
  int bytes_in_line=16;
  int max=bb.remaining();
  for (i=0; i < size && i < max; i++) {
    sb.append(String.format("0x%s ",Integer.toHexString(bb.get(i) & 0xFF)));
    if (((i + 1) % bytes_in_line) == 0) {
      Log.i(tag,String.format("%03d-%03d: %s",i / bytes_in_line * bytes_in_line,i,sb.toString()));
      sb=new StringBuilder();
    }
  }
  if (sb.length() > 0) {
    Log.i(tag,String.format("%03d-%03d: %s",size / bytes_in_line * bytes_in_line,i - 1,sb.toString()));
  }
}

public static void srs_print_bytes ( String tag , ByteBuffer bb , int size ) { StringBuilder sb = new StringBuilder ( ) ; int i = 0 ; int bytes_in_line = 16 ; int max = bb . remaining ( ) ; for ( i = 0 ; i < size && i < max ; i ++ ) { sb . append ( String . format ( "0x%s " , Integer . toHexString ( bb . get ( i ) & 0xFF ) ) ) ; if ( ( ( i + 1 ) % bytes_in_line ) == 0 ) { Log . i ( tag , String . format ( "%03d-%03d: %s" , i / bytes_in_line * bytes_in_line , i , sb . toString ( ) ) ) ; sb = new StringBuilder ( ) ; } } if ( sb . length ( ) > 0 ) { Log . i ( tag , String . format ( "%03d-%03d: %s" , size / bytes_in_line * bytes_in_line , i - 1 , sb . toString ( ) ) ) ; } }
print the size of bytes in bb
