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()); } }
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; }
switch (ccode) { case 20: return new TagLinkedBlock(code); case 30: return new TagVersion(code);
switch (ccode) { case 20: return new TagLinkedBlock(code); case 30: return new TagVersion(code);
switch (ccode) { case 20: return new TagLinkedBlock(code); case 30: return new TagVersion(code);
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()); } }
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; }