private String readByteArray(){
  final byte[] stream_=this.stream;
  final StringBuffer buf=new StringBuffer();
  int count=0;
  char w=(char)0;
  for (int to=stream_.length; (loc < to) && (stream_[loc] != '>'); ) {
    final char c=(char)stream_[loc];
    byte b=(byte)0;
    if (c >= '0' && c <= '9') {
      b=(byte)(c - '0');
    }
 else     if (c >= 'a' && c <= 'f') {
      b=(byte)(10 + (c - 'a'));
    }
 else     if (c >= 'A' && c <= 'F') {
      b=(byte)(10 + (c - 'A'));
    }
 else {
      loc++;
      continue;
    }
    final int offset=1 - (count % 2);
    w|=(0xf & b) << (offset << 2);
    if (offset == 0) {
      buf.append(w);
      w=(char)0;
    }
    ++count;
    ++loc;
  }
  ++loc;
  return buf.toString();
}

private String readByteArray ( ) { final byte [ ] stream_ = this . stream ; final StringBuffer buf = new StringBuffer ( ) ; int count = 0 ; char w = ( char ) 0 ; for ( int to = stream_ . length ; ( loc < to ) && ( stream_ [ loc ] != '>' ) ; ) { final char c = ( char ) stream_ [ loc ] ; byte b = ( byte ) 0 ; if ( c >= '0' && c <= '9' ) { b = ( byte ) ( c - '0' ) ; } else if ( c >= 'a' && c <= 'f' ) { b = ( byte ) ( 10 + ( c - 'a' ) ) ; } else if ( c >= 'A' && c <= 'F' ) { b = ( byte ) ( 10 + ( c - 'A' ) ) ; } else { loc ++ ; continue ; } final int offset = 1 - ( count % 2 ) ; w |= ( 0xf & b ) << ( offset << 2 ) ; if ( offset == 0 ) { buf . append ( w ) ; w = ( char ) 0 ; } ++ count ; ++ loc ; } ++ loc ; return buf . toString ( ) ; }
read a byte array from the stream . byte arrays begin with a ' < ' character , which has already been read , and end with a ' > ' character . each byte in the array is made up of two hex characters , the first being the high - order bit . we translate the byte arrays into char arrays by combining two bytes into a character , and then translate the character array into a string . [ jk fixme this is probably a really bad idea ! ]
