/** * Find the Tag that matches the code. * * @param code find Tag with this code. * @return Tag or null if no match. */ public static TagEnum getTag(short code) { TagEnum te = hash.get(code); if (te == null) te = new TagEnum("UNKNOWN", "UNKNOWN", code); return te; }
TagData getDataTag() throws IOException { if (dataTag == null) { dataTag = (TagData) tagMap.get(tagid(data_ref, TagEnum.COMPRESSED.getCode())); if (dataTag == null) throw new IllegalStateException("TagCompress not found for " + detail()); dataTag.used = true; } return dataTag; }
Tag(short code) throws IOException { this.extended = (code & 0x4000) != 0; this.code = (short) (code & 0x3FFF); refno = raf.readShort(); offset = raf.readInt(); length = raf.readInt(); t = TagEnum.getTag(this.code); if ((code > 1) && debugTracker) memTracker.add(t.getName() + " " + refno, offset, offset + length); //if (extended) // System.out.println(""); }
public String getType() { return t.toString(); }
public String getType() { return t.toString(); }
TagData getDataTag() throws IOException { if (dataTag == null) { dataTag = (TagData) tagMap.get(tagid(data_ref, TagEnum.COMPRESSED.getCode())); if (dataTag == null) throw new IllegalStateException("TagCompress not found for " + detail()); dataTag.used = true; } return dataTag; }
private Tag(short code) throws IOException { this.extended = (code & 0x4000) != 0; this.code = (short) (code & 0x3FFF); refno = raf.readShort(); offset = raf.readInt(); length = raf.readInt(); t = TagEnum.getTag(this.code); if ((code > 1) && debugTracker) memTracker.add(t.getName() + " " + refno, offset, offset + length); //if (extended) // System.out.println(""); }
/** * Find the Tag that matches the code. * * @param code find Tag with this code. * @return Tag or null if no match. */ public static TagEnum getTag(short code) { TagEnum te = hash.get(code); if (te == null) te = new TagEnum("UNKNOWN", "UNKNOWN", code); return te; }
public String getType() { return t.toString(); }
TagData getDataTag() throws IOException { if (dataTag == null) { dataTag = (TagData) tagMap.get(tagid(data_ref, TagEnum.COMPRESSED.getCode())); if (dataTag == null) throw new IllegalStateException("TagCompress not found for " + detail()); dataTag.used = true; } return dataTag; }
Tag(short code) throws IOException { this.extended = (code & 0x4000) != 0; this.code = (short) (code & 0x3FFF); refno = raf.readShort(); offset = raf.readInt(); length = raf.readInt(); t = TagEnum.getTag(this.code); if ((code > 1) && debugTracker) memTracker.add(t.getName() + " " + refno, offset, offset + length); //if (extended) // System.out.println(""); }
/** * Find the Tag that matches the code. * * @param code find Tag with this code. * @return Tag or null if no match. */ public static TagEnum getTag(short code) { TagEnum te = hash.get(code); if (te == null) te = new TagEnum("UNKNOWN", "UNKNOWN", code); return te; }
List<TagLinkedBlock> getLinkedDataBlocks() throws IOException { if (linkedDataBlocks == null) { linkedDataBlocks = new ArrayList<>(); if (debugLinked) System.out.println(" TagData readLinkTags " + detail()); short next = link_ref; // (short) (link_ref & 0x3FFF); while (next != 0) { TagLinkedBlock tag = (TagLinkedBlock) tagMap.get(tagid(next, TagEnum.LINKED.getCode())); if (tag == null) throw new IllegalStateException("TagLinkedBlock not found for " + detail()); tag.used = true; tag.read2(num_blk, linkedDataBlocks); next = tag.next_ref; // (short) (tag.next_ref & 0x3FFF); } } return linkedDataBlocks; }
List<TagLinkedBlock> getLinkedDataBlocks() throws IOException { if (linkedDataBlocks == null) { linkedDataBlocks = new ArrayList<TagLinkedBlock>(); if (debugLinked) System.out.println(" TagData readLinkTags " + detail()); short next = link_ref; // (short) (link_ref & 0x3FFF); while (next != 0) { TagLinkedBlock tag = (TagLinkedBlock) tagMap.get(tagid(next, TagEnum.LINKED.getCode())); if (tag == null) throw new IllegalStateException("TagLinkedBlock not found for " + detail()); tag.used = true; tag.read2(num_blk, linkedDataBlocks); next = tag.next_ref; // (short) (tag.next_ref & 0x3FFF); } } return linkedDataBlocks; }
List<TagLinkedBlock> getLinkedDataBlocks() throws IOException { if (linkedDataBlocks == null) { linkedDataBlocks = new ArrayList<TagLinkedBlock>(); if (debugLinked) System.out.println(" TagData readLinkTags " + detail()); short next = link_ref; // (short) (link_ref & 0x3FFF); while (next != 0) { TagLinkedBlock tag = (TagLinkedBlock) tagMap.get(tagid(next, TagEnum.LINKED.getCode())); if (tag == null) throw new IllegalStateException("TagLinkedBlock not found for " + detail()); tag.used = true; tag.read2(num_blk, linkedDataBlocks); next = tag.next_ref; // (short) (tag.next_ref & 0x3FFF); } } return linkedDataBlocks; }
private void read2(int nb, List<TagLinkedBlock> dataBlocks) throws IOException { raf.seek(offset); next_ref = raf.readShort(); block_ref = new short[nb]; for (int i = 0; i < nb; i++) { block_ref[i] = raf.readShort(); if (block_ref[i] == 0) break; n++; } if (debugLinked) System.out.println(" TagLinkedBlock read2 " + detail()); for (int i = 0; i < n; i++) { TagLinkedBlock tag = (TagLinkedBlock) tagMap.get(tagid(block_ref[i], TagEnum.LINKED.getCode())); tag.used = true; dataBlocks.add(tag); if (debugLinked) System.out.println(" Linked data= " + tag.detail()); } }
void read2(int nb, List<TagLinkedBlock> dataBlocks) throws IOException { raf.seek(offset); next_ref = raf.readShort(); block_ref = new short[nb]; for (int i = 0; i < nb; i++) { block_ref[i] = raf.readShort(); if (block_ref[i] == 0) break; n++; } if (debugLinked) System.out.println(" TagLinkedBlock read2 " + detail()); for (int i = 0; i < n; i++) { TagLinkedBlock tag = (TagLinkedBlock) tagMap.get(tagid(block_ref[i], TagEnum.LINKED.getCode())); tag.used = true; dataBlocks.add(tag); if (debugLinked) System.out.println(" Linked data= " + tag.detail()); } }
void read2(int nb, List<TagLinkedBlock> dataBlocks) throws IOException { raf.seek(offset); next_ref = raf.readShort(); block_ref = new short[nb]; for (int i = 0; i < nb; i++) { block_ref[i] = raf.readShort(); if (block_ref[i] == 0) break; n++; } if (debugLinked) System.out.println(" TagLinkedBlock read2 " + detail()); for (int i = 0; i < n; i++) { TagLinkedBlock tag = (TagLinkedBlock) tagMap.get(tagid(block_ref[i], TagEnum.LINKED.getCode())); tag.used = true; dataBlocks.add(tag); if (debugLinked) System.out.println(" Linked data= " + tag.detail()); } }
data = tagMap.get(tagid(vh.refno, TagEnum.VS.getCode())); if (null != data) { data.used = true;
data = tagMap.get(tagid(vh.refno, TagEnum.VS.getCode())); if (null != data) { data.used = true;