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; }
LinkedInputStream(H4header.SpecialLinked linked) throws IOException { List<H4header.TagLinkedBlock> linkedBlocks = linked.getLinkedDataBlocks(); nsegs = linkedBlocks.size(); segPosA = new long[nsegs]; segSizeA = new int[nsegs]; int count = 0; for (H4header.TagLinkedBlock tag : linkedBlocks) { segPosA[count] = tag.offset; segSizeA[count] = tag.length; count++; } }
void setLayoutInfo() throws IOException { if (data == null) return; if (null != data.linked) { isLinked = true; setDataBlocks(data.linked.getLinkedDataBlocks(), elemSize); } else if (null != data.compress) { isCompressed = true; TagData compData = data.compress.getDataTag(); tags.add(compData); isLinked = (compData.linked != null); if (isLinked) setDataBlocks(compData.linked.getLinkedDataBlocks(), elemSize); else { start = compData.offset; length = compData.length; hasNoData = (start < 0) || (length < 0); } } else if (null != data.chunked) { isChunked = true; chunks = data.chunked.getDataChunks(); chunkSize = data.chunked.chunk_length; isCompressed = data.chunked.isCompressed; } else { start = data.offset; hasNoData = (start < 0); } }
void setLayoutInfo() throws IOException { if (data == null) return; if (null != data.linked) { isLinked = true; setDataBlocks(data.linked.getLinkedDataBlocks(), elemSize); } else if (null != data.compress) { isCompressed = true; TagData compData = data.compress.getDataTag(); tags.add(compData); isLinked = (compData.linked != null); if (isLinked) setDataBlocks(compData.linked.getLinkedDataBlocks(), elemSize); else { start = compData.offset; length = compData.length; hasNoData = (start < 0) || (length < 0); } } else if (null != data.chunked) { isChunked = true; chunks = data.chunked.getDataChunks(); chunkSize = data.chunked.chunk_length; isCompressed = data.chunked.isCompressed; } else { start = data.offset; hasNoData = (start < 0); } }
void setLayoutInfo() throws IOException { if (data == null) return; if (null != data.linked) { isLinked = true; setDataBlocks(data.linked.getLinkedDataBlocks(), elemSize); } else if (null != data.compress) { isCompressed = true; TagData compData = data.compress.getDataTag(); tags.add(compData); isLinked = (compData.linked != null); if (isLinked) setDataBlocks(compData.linked.getLinkedDataBlocks(), elemSize); else { start = compData.offset; length = compData.length; hasNoData = (start < 0) || (length < 0); } } else if (null != data.chunked) { isChunked = true; chunks = data.chunked.getDataChunks(); chunkSize = data.chunked.chunk_length; isCompressed = data.chunked.isCompressed; } else { start = data.offset; hasNoData = (start < 0); } }
protected void read() throws IOException { if (extended) { raf.seek(offset); ext_type = raf.readShort(); // note size wrong in doc if (ext_type == TagEnum.SPECIAL_LINKED) { linked = new SpecialLinked(); linked.read(); } else if (ext_type == TagEnum.SPECIAL_COMP) { compress = new SpecialComp(); compress.read(); } else if (ext_type == TagEnum.SPECIAL_CHUNKED) { chunked = new SpecialChunked(); chunked.read(); } tag_len = (int) (raf.getFilePointer() - offset); } }
void read() throws IOException { if (extended) { raf.seek(offset); ext_type = raf.readShort(); // note size wrong in doc if (ext_type == TagEnum.SPECIAL_LINKED) { linked = new SpecialLinked(); linked.read(); } else if (ext_type == TagEnum.SPECIAL_COMP) { compress = new SpecialComp(); compress.read(); } else if (ext_type == TagEnum.SPECIAL_CHUNKED) { chunked = new SpecialChunked(); chunked.read(); } tag_len = (int) (raf.getFilePointer() - offset); } }
void read() throws IOException { if (extended) { raf.seek(offset); ext_type = raf.readShort(); // note size wrong in doc if (ext_type == TagEnum.SPECIAL_LINKED) { linked = new SpecialLinked(); linked.read(); } else if (ext_type == TagEnum.SPECIAL_COMP) { compress = new SpecialComp(); compress.read(); } else if (ext_type == TagEnum.SPECIAL_CHUNKED) { chunked = new SpecialChunked(); chunked.read(); } tag_len = (int) (raf.getFilePointer() - offset); } }
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<>(); 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; }
public String detail() { if (linked != null) return super.detail() + " ext_tag= " + ext_type + " tag_len= " + tag_len + " " + linked.detail(); else if (compress != null) return super.detail() + " ext_tag= " + ext_type + " tag_len= " + tag_len + " " + compress.detail(); else if (chunked != null) return super.detail() + " ext_tag= " + ext_type + " tag_len= " + tag_len + " " + chunked.detail(); else return super.detail(); }
public String detail() { if (linked != null) return super.detail() + " ext_tag= " + ext_type + " tag_len= " + tag_len + " " + linked.detail(); else if (compress != null) return super.detail() + " ext_tag= " + ext_type + " tag_len= " + tag_len + " " + compress.detail(); else if (chunked != null) return super.detail() + " ext_tag= " + ext_type + " tag_len= " + tag_len + " " + chunked.detail(); else return super.detail(); }
public String detail() { if (linked != null) return super.detail() + " ext_tag= " + ext_type + " tag_len= " + tag_len + " " + linked.detail(); else if (compress != null) return super.detail() + " ext_tag= " + ext_type + " tag_len= " + tag_len + " " + compress.detail(); else if (chunked != null) return super.detail() + " ext_tag= " + ext_type + " tag_len= " + tag_len + " " + chunked.detail(); else return super.detail(); }
LinkedInputStream(H4header.SpecialLinked linked) throws IOException { List<H4header.TagLinkedBlock> linkedBlocks = linked.getLinkedDataBlocks(); nsegs = linkedBlocks.size(); segPosA = new long[nsegs]; segSizeA = new int[nsegs]; int count = 0; for (H4header.TagLinkedBlock tag : linkedBlocks) { segPosA[count] = tag.offset; segSizeA[count] = tag.length; count++; } }
LinkedInputStream(H4header.SpecialLinked linked) throws IOException { List<H4header.TagLinkedBlock> linkedBlocks = linked.getLinkedDataBlocks(); nsegs = linkedBlocks.size(); segPosA = new long[nsegs]; segSizeA = new int[nsegs]; int count = 0; for (H4header.TagLinkedBlock tag : linkedBlocks) { segPosA[count] = tag.offset; segSizeA[count] = tag.length; count++; } }