/** * 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 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); }
/** * 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); }
Array getHeapDataArray(HeapIdentifier heapId, DataType dataType, int endian) throws IOException, InvalidRangeException { GlobalHeap.HeapObject ho = heapId.getHeapObject(); if (ho == null) { throw new InvalidRangeException("Illegal Heap address = " + ho);
Array getHeapDataArray(HeapIdentifier heapId, DataType dataType, int endian) throws IOException, InvalidRangeException { GlobalHeap.HeapObject ho = heapId.getHeapObject(); if (ho == null) { throw new InvalidRangeException("Illegal Heap address, HeapObject = " + heapId);
Array getHeapDataArray(HeapIdentifier heapId, DataType dataType, int endian) throws IOException, InvalidRangeException { GlobalHeap.HeapObject ho = heapId.getHeapObject(); if (ho == null) { throw new InvalidRangeException("Illegal Heap address, HeapObject = " + heapId);
/** * 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); }
/** * 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(); raf.seek(ho.dataPos); return readStringFixedLength((int) ho.dataSize); }