in.read();
c = in.read(); if (c == -1) { break; }
    public void load(InputStream in) throws MessagingException {        try {            StringBuffer name = new StringBuffer(32);            StringBuffer value = new StringBuffer(128);            done: while (true) {                int c = in.read();                char ch = (char) c;                if (c == -1) {                    break;                } else if (c == 13) {                    // empty line terminates header                    in.read(); // skip LF                    break;                } else if (Character.isWhitespace(ch)) {                    // handle continuation                    do {                        c = in.read();                        if (c == -1) {                            break done;                        }                        ch = (char) c;                    } while (Character.isWhitespace(ch));                } else {                    // new header                    if (name.length() > 0) {                        addHeader(name.toString().trim(), value.toString().trim());                    }                    name.setLength(0);                    value.setLength(0);                    while (true) {                        name.append((char) c);                        c = in.read();                        if (c == -1) {                            break done;                        } else if (c == ':') {                            break;                        }                    }                    c = in.read();                    if (c == -1) {                        break done;                    }                }                while (c != 13) {                    ch = (char) c;                    value.append(ch);                    c = in.read();                    if (c == -1) {                        break done;                    }                }                // skip LF                in.read();            }            if (name.length() > 0) {                addHeader(name.toString().trim(), value.toString().trim());            }        } catch (IOException e) {            throw new MessagingException("Error loading headers", e);        }    }