private void readName()
        {//throws IOException {
            int i    = 0;
            int mark = pos;

            while (pos < buf.Length)
            {
                byte b = buf[pos++];

                if (b == ':')
                {
                    byte[] nameBuffer = wrap(mark, pos - 1);

                    if (buf[pos++] != ' ')
                    {
                        throw new java.io.IOException("Invalid attribute " + nameBuffer); //$NON-NLS-1$
                    }

                    name = new AttributesNS.Name(nameBuffer);
                    return;
                }

                if (!((b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' ||
                      b == '-' || (b >= '0' && b <= '9')))
                {
                    throw new java.io.IOException("Invalid attribute " + b); //$NON-NLS-1$
                }
            }
            if (i > 0)
            {
                throw new java.io.IOException("Invalid attribute " + wrap(mark, buf.Length)); //$NON-NLS-1$
            }
        }
        java.nio.CharBuffer cBuf = java.nio.CharBuffer.allocate(72);                                      // ThreadLocalCache.charBuffer.get();

        internal InitManifest(byte[] buf, Attributes main, AttributesNS.Name ver)
        {//throws IOException {
            this.buf = buf;

            // check a version attribute
            if (!readHeader() || (ver != null && !name.equals(ver)))
            {
                throw new java.io.IOException("Missing version attribute: " + ver); //$NON-NLS-1$
            }

            main.put(name, value);
            while (readHeader())
            {
                main.put(name, value);
            }
        }
        private void readName()
        {
            //throws IOException {
            int i = 0;
            int mark = pos;

            while (pos < buf.Length)
            {
                byte b = buf[pos++];

                if (b == ':')
                {
                    byte[] nameBuffer = wrap(mark, pos - 1);

                    if (buf[pos++] != ' ')
                    {
                        throw new java.io.IOException("Invalid attribute " + nameBuffer); //$NON-NLS-1$
                    }

                    name = new AttributesNS.Name(nameBuffer);
                    return;
                }

                if (!((b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_'
                        || b == '-' || (b >= '0' && b <= '9')))
                {
                    throw new java.io.IOException("Invalid attribute " + b); //$NON-NLS-1$
                }
            }
            if (i > 0)
            {
                throw new java.io.IOException("Invalid attribute " + wrap(mark, buf.Length)); //$NON-NLS-1$
            }
        }
 /**
  * Returns the value associated with the parameter {@code Attributes.Name}
  * key.
  *
  * @param name
  *            the key to obtain the value for.
  * @return the {@code String} associated with name, or {@code null} if name
  *         is not a valid key.
  */
 public String getValue(AttributesNS.Name name)
 {
     return((String)map.get(name));
 }