/** * Fetch a String from the heap. * * @param heapIdAddress address of the heapId, used to get the String out of the heap * @return String the String read from the heap * @throws IOException on read error */ String readHeapString(long heapIdAddress) throws IOException { H5header.HeapIdentifier heapId = new HeapIdentifier(heapIdAddress); H5header.GlobalHeap.HeapObject ho = heapId.getHeapObject(); if (ho == null) throw new IllegalStateException("Cant find Heap Object,heapId="+heapId); if (ho.dataSize > 1000 * 1000) return String.format("Bad HeapObject.dataSize=%s", ho); raf.seek(ho.dataPos); return readStringFixedLength((int) ho.dataSize); }
/** * Fetch a Vlen data array. * * @param globalHeapIdAddress address of the heapId, used to get the String out of the heap * @param dataType type of data * @param endian byteOrder of the data (0 = BE, 1 = LE) * @return the Array read from the heap * @throws IOException on read error */ Array getHeapDataArray(long globalHeapIdAddress, DataType dataType, int endian) throws IOException, InvalidRangeException { HeapIdentifier heapId = new HeapIdentifier(globalHeapIdAddress); if (debugHeap) debugOut.println(" heapId= " + heapId); return getHeapDataArray(heapId, dataType, endian); // Object pa = getHeapDataArray(heapId, dataType, endian); // return Array.factory(dataType.getPrimitiveClassType(), new int[]{heapId.nelems}, pa); }
/** * Fetch a Vlen data array. * * @param globalHeapIdAddress address of the heapId, used to get the String out of the heap * @param dataType type of data * @param endian byteOrder of the data (0 = BE, 1 = LE) * @return String the String read from the heap * @throws IOException on read error */ Array getHeapDataArray(long globalHeapIdAddress, DataType dataType, int endian) throws IOException, InvalidRangeException { HeapIdentifier heapId = new HeapIdentifier(globalHeapIdAddress); if (debugHeap) debugOut.println(" heapId= " + heapId); return getHeapDataArray(heapId, dataType, endian); // Object pa = getHeapDataArray(heapId, dataType, endian); // return Array.factory(dataType.getPrimitiveClassType(), new int[]{heapId.nelems}, pa); }
/** * Fetch a Vlen data array. * * @param globalHeapIdAddress address of the heapId, used to get the String out of the heap * @param dataType type of data * @param endian byteOrder of the data (0 = BE, 1 = LE) * @return the Array read from the heap * @throws IOException on read error */ Array getHeapDataArray(long globalHeapIdAddress, DataType dataType, int endian) throws IOException, InvalidRangeException { HeapIdentifier heapId = new HeapIdentifier(globalHeapIdAddress); if (debugHeap) { log.debug(" heapId= {}", heapId); } return getHeapDataArray(heapId, dataType, endian); // Object pa = getHeapDataArray(heapId, dataType, endian); // return Array.factory(dataType.getPrimitiveClassType(), new int[]{heapId.nelems}, pa); }
/** * Fetch a String from the heap, when the heap identifier has already beed read into a ByteBuffer at given pos * * @param bb heap id is here * @param pos at this position * @return String the String read from the heap * @throws IOException on read error */ String readHeapString(ByteBuffer bb, int pos) throws IOException { H5header.HeapIdentifier heapId = new HeapIdentifier(bb, pos); H5header.GlobalHeap.HeapObject ho = heapId.getHeapObject(); if (ho == null) throw new IllegalStateException("Cant find Heap Object,heapId="+heapId); // if (H5iosp.debugHeapStrings) System.out.printf(" readHeapString ho=%s%n", ho); raf.seek(ho.dataPos); return readStringFixedLength((int) ho.dataSize); }
Array readHeapVlen(ByteBuffer bb, int pos, DataType dataType, int endian) throws IOException, InvalidRangeException { H5header.HeapIdentifier heapId = new HeapIdentifier(bb, pos); return getHeapDataArray(heapId, dataType, endian); }
/** * Fetch a String from the heap, when the heap identifier has already beed read into a ByteBuffer at given pos * @param bb heap id is here * @param pos at this position * @return String the String read from the heap * @throws IOException on read error */ String readHeapString(ByteBuffer bb, int pos) throws IOException { H5header.HeapIdentifier heapId = new HeapIdentifier(bb, pos); H5header.GlobalHeap.HeapObject ho = heapId.getHeapObject(); raf.seek(ho.dataPos); return readStringFixedLength((int) ho.dataSize); }
Array readHeapVlen(ByteBuffer bb, int pos, DataType dataType, int endian) throws IOException, InvalidRangeException { H5header.HeapIdentifier heapId = new HeapIdentifier(bb, pos); return getHeapDataArray(heapId, dataType, endian); }
/** * Fetch a String from the heap. * * @param heapIdAddress address of the heapId, used to get the String out of the heap * @return String the String read from the heap * @throws IOException on read error */ String readHeapString(long heapIdAddress) throws IOException { H5header.HeapIdentifier heapId = new HeapIdentifier(heapIdAddress); H5header.GlobalHeap.HeapObject ho = heapId.getHeapObject(); raf.seek(ho.dataPos); return readStringFixedLength((int) ho.dataSize); }
/** * Fetch a String from the heap, when the heap identifier has already beed read into a ByteBuffer at given pos * * @param bb heap id is here * @param pos at this position * @return String the String read from the heap * @throws IOException on read error */ String readHeapString(ByteBuffer bb, int pos) throws IOException { H5header.HeapIdentifier heapId = new HeapIdentifier(bb, pos); H5header.GlobalHeap.HeapObject ho = heapId.getHeapObject(); if (ho == null) throw new IllegalStateException("Cant find Heap Object,heapId="+heapId); raf.seek(ho.dataPos); return readStringFixedLength((int) ho.dataSize); }
/** * Fetch a String from the heap. * * @param heapIdAddress address of the heapId, used to get the String out of the heap * @return String the String read from the heap * @throws IOException on read error */ String readHeapString(long heapIdAddress) throws IOException { H5header.HeapIdentifier heapId = new HeapIdentifier(heapIdAddress); H5header.GlobalHeap.HeapObject ho = heapId.getHeapObject(); if (ho == null) throw new IllegalStateException("Cant find Heap Object,heapId="+heapId); raf.seek(ho.dataPos); return readStringFixedLength((int) ho.dataSize); }
Array readHeapVlen(ByteBuffer bb, int pos, DataType dataType, int endian) throws IOException, InvalidRangeException { H5header.HeapIdentifier heapId = new HeapIdentifier(bb, pos); return getHeapDataArray(heapId, dataType, endian); }