}
}
- public static char[] hexDigit = new char[] { '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f' };
- public static String hex(byte[] b, int len) {
- StringBuffer sb = new StringBuffer(len);
- for(int i=0;i<len;i++) {
- if((i%8)==0) sb.append("\n");
- else if(i!=0) sb.append(":");
- sb.append(hexDigit[(b[i]&0xf0)>>4]).append(hexDigit[b[i]&0xf]);
- }
- return sb.toString();
- }
-
private byte[] readHandshake() throws IOException {
if(handshakeDataLength == 0) {
handshakeDataStart = 0;