code: private List<IdentificationDescriptor> parseDescriptorList(DataInputStream in)
           throws IOException
     {
        List<IdentificationDescriptor> descriptorList = new LinkedList<IdentificationDescriptor>();
  
        int readPageLength = 0;
        while (readPageLength < this.pageLength)
        {
           IdentificationDescriptor desc = new IdentificationDescriptor();
  
           // byte 0
           int b0 = in.readUnsignedByte();
           desc.setProtocolIdentifier(b0 >>> 4);
           desc.setCodeSet(b0 & 0x0F);
  
           // byte 1
           int b1 = in.readUnsignedByte();
           desc.setPIV((b1 >>> 7) == 1);
           desc.setAssociation((b1 & 0x30) >>> 4);
           desc.setIdentifierType(IdentifierType.valueOf(b1 & 0x15));
  
           // byte 2
           in.readUnsignedByte();
  
           // byte 3
           int idLength = in.readUnsignedByte();
  
           // identifier
           byte[] ident = new byte[idLength];
           in.read(ident);
           desc.setIdentifier(ident);
  
           descriptorList.add(desc);
           readPageLength += idLength + 4;
        }
  
        return descriptorList;
     }
docs: utility