try { final List<AttributeListEntry> entries = attributeList.getEntries(attrTypeID); if (!entries.isEmpty()) { log.debug("Found entries via $ATTRIBUTE_LIST: " + entries); MasterFileTable mft = getVolume().getMFT(); NTFSAttribute attribute = null; for (AttributeListEntry entry : entries) {    NTFSAttribute attr = mft.getRecord(entry.getFileReferenceNumber()) .getAttribute(attrTypeID);  if (attribute == null) {  attribute = attr; if (!(attr instanceof NTFSNonResidentAttribute)) { log.info("Don't know how to glue together resident attributes, " + "returning the first one alone"); break; } } else {  if (attr instanceof NTFSNonResidentAttribute) { log.debug("Appending data runs onto parent attribute"); ((NTFSNonResidentAttribute) attribute).appendDataRuns( ((NTFSNonResidentAttribute) attr).getDataRuns()); } else { log.info("Don't know how to glue a resident attribute onto " + "a non-resident one, skipping this attribute."); } } }  return attribute; } } catch (IOException e) { log.error("IO error getting locating attribute list entry", e); }
    public NTFSAttribute getAttribute(int attrTypeID) {        log.debug("getAttribute(0x" + NumberUtils.hex(attrTypeID, 4) + ")");        int offset = this.getFirtAttributeOffset();        while (true) {            final int type = getUInt32AsInt(offset + 0x00);            if (type == 0xFFFFFFFF) {                // The end of the attribute list                break;            } else if (type == attrTypeID) {                return NTFSAttribute.getAttribute(this, offset);            } else {                // Skip and go to the next                final int attrLength = getUInt32AsInt(offset + 0x04);                offset += attrLength;            }        }        if (attrTypeID != NTFSAttribute.Types.ATTRIBUTE_LIST) {            if (getAttribute(NTFSAttribute.Types.ATTRIBUTE_LIST) != null) {                log.info("Has $ATTRIBUTE_LIST attribute");            }        }        log.info("getAttribute(0x" + NumberUtils.hex(attrTypeID, 4)                + ") not found");        return null;    }