private ArrayStructure convertStructure(Structure s, Layout layout, int[] shape, byte[] byteArray) throws IOException, InvalidRangeException { // create StructureMembers - must set offsets StructureMembers sm = s.makeStructureMembers(); int calcSize = ArrayStructureBB.setOffsets(sm); // standard //ArrayStructureBB.showOffsets(sm, new Indent(2), new Formatter(System.out)); // special offset setting boolean hasHeap = convertStructure(s, sm); //ArrayStructureBB.showOffsets(sm, new Indent(2), new Formatter(System.out)); int recSize = layout.getElemSize(); if (recSize < calcSize) { log.error("calcSize = %d actualSize = %d%n", calcSize, recSize); throw new IOException("H5iosp illegal structure size " + s.getFullName()); } sm.setStructureSize(recSize); // place data into an ArrayStructureBB ByteBuffer bb = ByteBuffer.wrap(byteArray); ArrayStructureBB asbb = new ArrayStructureBB(sm, shape, bb, 0); // strings are stored on the heap, and must be read separately if (hasHeap) { int destPos = 0; for (int i = 0; i < layout.getTotalNelems(); i++) { // loop over each structure convertHeap(asbb, destPos, sm); destPos += layout.getElemSize(); } } return asbb; }
private ArrayStructure convertStructure(Structure s, Layout layout, int[] shape, byte[] byteArray) throws IOException, InvalidRangeException { // create StructureMembers - must set offsets StructureMembers sm = s.makeStructureMembers(); int calcSize = ArrayStructureBB.setOffsets(sm); // standard //ArrayStructureBB.showOffsets(sm, new Indent(2), new Formatter(System.out)); // special offset setting boolean hasHeap = convertStructure(s, sm); //ArrayStructureBB.showOffsets(sm, new Indent(2), new Formatter(System.out)); int recSize = layout.getElemSize(); if (recSize < calcSize) { log.error("calcSize = %d actualSize = %d%n", calcSize, recSize); throw new IOException("H5iosp illegal structure size " + s.getFullName()); } sm.setStructureSize(recSize); // place data into an ArrayStructureBB ByteBuffer bb = ByteBuffer.wrap(byteArray); ArrayStructureBB asbb = new ArrayStructureBB(sm, shape, bb, 0); // strings are stored on the heap, and must be read separately if (hasHeap) { int destPos = 0; for (int i = 0; i < layout.getTotalNelems(); i++) { // loop over each structure convertHeap(asbb, destPos, sm); destPos += layout.getElemSize(); } } return asbb; }
private ArrayStructure convertStructure(Structure s, Layout layout, int[] shape, byte[] byteArray) throws IOException, InvalidRangeException { // create StructureMembers - must set offsets StructureMembers sm = s.makeStructureMembers(); int calcSize = ArrayStructureBB.setOffsets(sm); // standard //ArrayStructureBB.showOffsets(sm, new Indent(2), new Formatter(System.out)); // special offset setting boolean hasHeap = convertStructure(s, sm); //ArrayStructureBB.showOffsets(sm, new Indent(2), new Formatter(System.out)); int recSize = layout.getElemSize(); if (recSize < calcSize) { log.error("calcSize = %d actualSize = %d%n", calcSize, recSize); throw new IOException("H5iosp illegal structure size " + s.getFullName()); } sm.setStructureSize(recSize); // place data into an ArrayStructureBB ByteBuffer bb = ByteBuffer.wrap(byteArray); ArrayStructureBB asbb = new ArrayStructureBB(sm, shape, bb, 0); // strings and vlens are stored on the heap, and must be read separately if (hasHeap) { int destPos = 0; for (int i = 0; i < layout.getTotalNelems(); i++) { // loop over each structure convertHeap(asbb, destPos, sm); destPos += layout.getElemSize(); } } return asbb; }
if (chunk == null) continue; for (int i = 0; i < chunk.getNelems(); i++) { // 16 byte "heap ids" sa[count++] = headerParser.readHeapString(chunk.getSrcPos() + layout.getElemSize() * i); Layout.Chunk chunk = layout.next(); if (chunk == null) continue; int recsize = layout.getElemSize(); for (int i = 0; i < chunk.getNelems(); i++) { byte[] pa = new byte[recsize];
if (chunk == null) continue; for (int i = 0; i < chunk.getNelems(); i++) { // 16 byte "heap ids" sa[count++] = headerParser.readHeapString(chunk.getSrcPos() + layout.getElemSize() * i); Layout.Chunk chunk = layout.next(); if (chunk == null) continue; int recsize = layout.getElemSize(); for (int i = 0; i < chunk.getNelems(); i++) { byte[] pa = new byte[recsize];
if (chunk == null) continue; for (int i = 0; i < chunk.getNelems(); i++) { // 16 byte "heap ids" sa[count++] = headerParser.readHeapString(chunk.getSrcPos() + layout.getElemSize() * i); Layout.Chunk chunk = layout.next(); if (chunk == null) continue; int recsize = layout.getElemSize(); for (int i = 0; i < chunk.getNelems(); i++) { byte[] pa = new byte[recsize];
if (chunk == null) continue; for (int i = 0; i < chunk.getNelems(); i++) { long address = chunk.getSrcPos() + layout.getElemSize() * i; Array vlenArray = headerParser.getHeapDataArray(address, readType, endian); data[count++] = (typeInfo.base.hdfType == 7) ? convertReference(vlenArray) : vlenArray; int recsize = layout.getElemSize(); long size = recsize * layout.getTotalNelems(); byte[] byteArray = new byte[(int)size]; if (chunk == null) continue; if (debugStructure) System.out.println(" readStructure " + v.getFullName() + " chunk= " + chunk + " index.getElemSize= " + layout.getElemSize());
if (chunk == null) continue; for (int i = 0; i < chunk.getNelems(); i++) { long address = chunk.getSrcPos() + layout.getElemSize() * i; Array vlenArray = headerParser.getHeapDataArray(address, readType, endian); data[count++] = (typeInfo.base.hdfType == 7) ? convertReference(vlenArray) : vlenArray; int recsize = layout.getElemSize(); long size = recsize * layout.getTotalNelems(); byte[] byteArray = new byte[(int)size]; if (chunk == null) continue; if (debugStructure) System.out.println(" readStructure " + v.getFullName() + " chunk= " + chunk + " index.getElemSize= " + layout.getElemSize());
if (chunk == null) continue; for (int i = 0; i < chunk.getNelems(); i++) { long address = chunk.getSrcPos() + layout.getElemSize() * i; Array vlenArray = headerParser.getHeapDataArray(address, readType, endian); data[count++] = (typeInfo.base.hdfType == 7) ? convertReference(vlenArray) : vlenArray; int recsize = layout.getElemSize(); long size = recsize * layout.getTotalNelems(); byte[] byteArray = new byte[(int)size]; if (chunk == null) continue; if (debugStructure) System.out.println(" readStructure " + v.getFullName() + " chunk= " + chunk + " index.getElemSize= " + layout.getElemSize());
if (chunk == null) continue; if (debugStructure) { log.debug(" readStructure " + matt.name + " chunk= " + chunk + " index.getElemSize= " + layout.getElemSize()); for (int i = 0; i < layout.getTotalNelems(); i++) { // loop over each structure h5iosp.convertHeap(asbb, destPos, sm); destPos += layout.getElemSize(); if (chunk == null) continue; for (int i = 0; i < chunk.getNelems(); i++) { long address = chunk.getSrcPos() + layout.getElemSize() * i; String sval = readHeapString(address); data.set(count++, sval); if (chunk == null) continue; for (int i = 0; i < chunk.getNelems(); i++) { long address = chunk.getSrcPos() + layout.getElemSize() * i; Array vlenArray = getHeapDataArray(address, readType, endian); if (vinfo.typeInfo.base.hdfType == 7)
if (chunk == null) continue; if (debugStructure) System.out.println(" readStructure " + matt.name + " chunk= " + chunk + " index.getElemSize= " + layout.getElemSize()); for (int i = 0; i < layout.getTotalNelems(); i++) { // loop over each structure h5iosp.convertHeap(asbb, destPos, sm); destPos += layout.getElemSize(); if (chunk == null) continue; for (int i = 0; i < chunk.getNelems(); i++) { long address = chunk.getSrcPos() + layout.getElemSize() * i; String sval = readHeapString(address); data.set(count++, sval); if (chunk == null) continue; for (int i = 0; i < chunk.getNelems(); i++) { long address = chunk.getSrcPos() + layout.getElemSize() * i; Array vlenArray = getHeapDataArray(address, readType, endian); if (vinfo.typeInfo.base.hdfType == 7)
if (chunk == null) continue; if (debugStructure) System.out.println(" readStructure " + matt.name + " chunk= " + chunk + " index.getElemSize= " + layout.getElemSize()); for (int i = 0; i< layout.getTotalNelems(); i++) { // loop over each structure h5iosp.convertHeap(asbb, destPos, sm); destPos += layout.getElemSize(); if (chunk == null) continue; for (int i = 0; i < chunk.getNelems(); i++) { long address = chunk.getSrcPos() + layout.getElemSize() * i; String sval = readHeapString(address); data.set(count++, sval); if (chunk == null) continue; for (int i = 0; i < chunk.getNelems(); i++) { long address = chunk.getSrcPos() + layout.getElemSize() * i; Array vlenArray = getHeapDataArray(address, readType, endian); if (vinfo.typeInfo.base.hdfType == 7)
int recsize = index.getElemSize(); byte[] pa = (byte[]) arr; while (index.hasNext()) {
int recsize = index.getElemSize(); byte[] pa = (byte[]) arr; while (index.hasNext()) {
int recsize = index.getElemSize(); byte[] pa = (byte[]) arr; while (index.hasNext()) {
int recsize = layout.getElemSize(); while (layout.hasNext()) { Layout.Chunk chunk = layout.next();
int recsize = layout.getElemSize(); while (layout.hasNext()) { Layout.Chunk chunk = layout.next();
int recsize = layout.getElemSize(); while (layout.hasNext()) { Layout.Chunk chunk = layout.next();