value.append(line.substring(0, len - 1));
int last = len - 1; if (line.charAt(last) != '\r') ++last; value.append(line.substring(0, last));
  public void parse(InputStream in)    throws IOException  {    LineInputStream lin = (in instanceof LineInputStream) ?      (LineInputStream) in : new LineInputStream(in);        String name = null;    StringBuffer value = new StringBuffer();    while (true)      {        String line = lin.readLine();        if (line == null)          {            if (name != null)              {                addValue(name, value.toString());              }            break;          }        int len = line.length();        if (len < 2)          {            if (name != null)              {                addValue(name, value.toString());              }            break;          }        char c1 = line.charAt(0);        if (c1 == ' ' || c1 == '\t')          {            // Continuation            value.append(line.substring(0, len - 1));          }        else          {            if (name != null)              {                addValue(name, value.toString());              }                        int di = line.indexOf(':');            name = line.substring(0, di);            value.setLength(0);            do              {                di++;              }            while (di < len && line.charAt(di) == ' ');            value.append(line.substring(di, len - 1));          }      }  }