if (line.length() == 0 || line.charAt(0) == '#' || line.charAt(0) == '!') continue;
  public void load(InputStream inStream) throws IOException  {    // The spec says that the file must be encoded using ISO-8859-1.    BufferedReader reader =      new BufferedReader(new InputStreamReader(inStream, "ISO-8859-1"));    String line;    while ((line = reader.readLine()) != null)      {        char c = 0;        int pos = 0;        // If empty line or begins with a comment character, skip this line.        if (line.length() == 0	    || line.charAt(0) == '#' || line.charAt(0) == '!')          continue;        while (pos < line.length()               && Character.isWhitespace(c = line.charAt(pos)))          pos++;        // If line is empty skip this line.        if (pos == line.length())          continue;        // The characters up to the next Whitespace, ':', or '='        // describe the key.  But look for escape sequences.        StringBuffer key = new StringBuffer();        while (pos < line.length()               && ! Character.isWhitespace(c = line.charAt(pos++))               && c != '=' && c != ':')          {            if (c == '\\')              {                if (pos == line.length())                  {                    // The line continues on the next line.                    line = reader.readLine();                    pos = 0;                    while (pos < line.length()                           && Character.isWhitespace(c = line.charAt(pos)))                      pos++;                  }                else                  {                    c = line.charAt(pos++);                    switch (c)                      {                      case 'n':                        key.append('\n');                        break;                      case 't':                        key.append('\t');                        break;                      case 'r':                        key.append('\r');                        break;                      case 'u':                        if (pos + 4 <= line.length())                          {                            char uni = (char) Integer.parseInt                              (line.substring(pos, pos + 4), 16);                            key.append(uni);                            pos += 4;                          }        // else throw exception?                        break;                      default:                        key.append(c);                        break;                      }                  }              }            else              key.append(c);          }        boolean isDelim = (c == ':' || c == '=');        while (pos < line.length()               && Character.isWhitespace(c = line.charAt(pos)))          pos++;        if (! isDelim && (c == ':' || c == '='))          {            pos++;            while (pos < line.length()                   && Character.isWhitespace(c = line.charAt(pos)))              pos++;          }        StringBuffer element = new StringBuffer(line.length() - pos);        while (pos < line.length())          {            c = line.charAt(pos++);            if (c == '\\')              {                if (pos == line.length())                  {                    // The line continues on the next line.                    line = reader.readLine();		    // We might have seen a backslash at the end of		    // the file.  The JDK ignores the backslash in		    // this case, so we follow for compatibility.		    if (line == null)		      break;                    pos = 0;                    while (pos < line.length()                           && Character.isWhitespace(c = line.charAt(pos)))                      pos++;                    element.ensureCapacity(line.length() - pos +                                           element.length());                  }                else                  {                    c = line.charAt(pos++);                    switch (c)                      {                      case 'n':                        element.append('\n');                        break;                      case 't':                        element.append('\t');                        break;                      case 'r':                        element.append('\r');                        break;                      case 'u':                        if (pos + 4 <= line.length())                          {                            char uni = (char) Integer.parseInt                              (line.substring(pos, pos + 4), 16);                            element.append(uni);                            pos += 4;                          }        // else throw exception?                        break;                      default:                        element.append(c);                        break;                      }                  }              }            else              element.append(c);          }        put(key.toString(), element.toString());      }  }