if (ch == '\n' || ch == '\r') { if (sb.length() == 0) { continue; } break; } sb.append((char) ch);
    private int readChunkLength() throws IOException {        int ch = 0;        StringBuffer sb = new StringBuffer();        while(true) {            int r = mySource.read();            if (r < 0) {                return 0;            }            ch = (char) r;            if (ch == '\r') {                continue;            }            if (ch == '\n' || ch == '\r') {                if (sb.length() == 0) {                    continue;                }                break;            }            sb.append((char) ch);        }        return Integer.parseInt(sb.toString(), 16);    }