public static boolean check_id(final String id)
    throws IOException
  {
    for(int i = 0; i < 4; i++)
    {
      if((id.charAt(i) < ' ') || (id.charAt(i) > '~'))
      {
        throw new IOException("Illegal chunk id");
      }
    }
    for(int i = 0; i < szComposite.length; i++)
    {
      if(id.equals(szComposite[i]))
      {
        return true;
      }
    }
    final String s = id.substring(0, 3);
    for(int i = 0; i < szReserved.length; i++)
    {
      if(
        s.equals(szReserved[i])
        && (id.charAt(3) >= '1')
        && (id.charAt(3) <= '9'))
      {
        throw new IOException("Illegal chunk id");
      }
    }
    return false;
  }