@Test void testChunkedV4() { assertDoesNotThrow(() -> RawChunkAccess.main(new String[]{"src/test/resources/hdf5/chunked_v4_datasets.hdf5", "/filtered_btree_v2/float32"})); }
public static void main(String[] args) { File file = new File(args[0]); try (HdfFile hdfFile = new HdfFile(file)) { Dataset dataset = hdfFile.getDatasetByPath(args[1]); if (dataset instanceof ChunkedDataset) { ChunkedDataset chunkedDataset = (ChunkedDataset) dataset; int[] chunkOffset = new int[chunkedDataset.getChunkDimensions().length]; System.out.println("Chunk offset: " + ArrayUtils.toString(chunkOffset)); ByteBuffer rawChunkBuffer = chunkedDataset.getRawChunkBuffer(chunkOffset); byte[] byteArray = new byte[rawChunkBuffer.capacity()]; rawChunkBuffer.get(byteArray); System.out.println("Raw bytes: " + ArrayUtils.toString(byteArray)); } else { throw new IllegalArgumentException("Dataset is not chunked"); } } }
RawChunkAccess { public static void main(String[] args) { File file = new File(args[0]); try (HdfFile hdfFile = new HdfFile(file)) { Dataset dataset = hdfFile.getDatasetByPath(args[1]); if (dataset instanceof ChunkedDataset) { ChunkedDataset chunkedDataset = (ChunkedDataset) dataset; int[] chunkOffset = new int[chunkedDataset.getChunkDimensions().length]; System.out.println("Chunk offset: " + ArrayUtils.toString(chunkOffset)); ByteBuffer rawChunkBuffer = chunkedDataset.getRawChunkBuffer(chunkOffset); byte[] byteArray = new byte[rawChunkBuffer.capacity()]; rawChunkBuffer.get(byteArray); System.out.println("Raw bytes: " + ArrayUtils.toString(byteArray)); } else { throw new IllegalArgumentException("Dataset is not chunked"); } } } }
RawChunkAccess { public static void main(String[] args) { File file = new File(args[0]); try (HdfFile hdfFile = new HdfFile(file)) { Dataset dataset = hdfFile.getDatasetByPath(args[1]); if (dataset instanceof ChunkedDataset) { ChunkedDataset chunkedDataset = (ChunkedDataset) dataset; int[] chunkOffset = new int[chunkedDataset.getChunkDimensions().length]; System.out.println("Chunk offset: " + ArrayUtils.toString(chunkOffset)); ByteBuffer rawChunkBuffer = chunkedDataset.getRawChunkBuffer(chunkOffset); byte[] byteArray = new byte[rawChunkBuffer.capacity()]; rawChunkBuffer.get(byteArray); System.out.println("Raw bytes: " + ArrayUtils.toString(byteArray)); } else { throw new IllegalArgumentException("Dataset is not chunked"); } } }  }
RawChunkAccess { public static void main(String[] args) { File file = new File(args[0]); try (HdfFile hdfFile = new HdfFile(file)) { Dataset dataset = hdfFile.getDatasetByPath(args[1]); if (dataset instanceof ChunkedDataset) { ChunkedDataset chunkedDataset = (ChunkedDataset) dataset; int[] chunkOffset = new int[chunkedDataset.getChunkDimensions().length]; System.out.println("Chunk offset: " + ArrayUtils.toString(chunkOffset)); ByteBuffer rawChunkBuffer = chunkedDataset.getRawChunkBuffer(chunkOffset); byte[] byteArray = new byte[rawChunkBuffer.capacity()]; rawChunkBuffer.get(byteArray); System.out.println("Raw bytes: " + ArrayUtils.toString(byteArray)); } else { throw new IllegalArgumentException("Dataset is not chunked"); } } }  static void main(String[] args); }
RawChunkAccess { public static void main(String[] args) { File file = new File(args[0]); try (HdfFile hdfFile = new HdfFile(file)) { Dataset dataset = hdfFile.getDatasetByPath(args[1]); if (dataset instanceof ChunkedDataset) { ChunkedDataset chunkedDataset = (ChunkedDataset) dataset; int[] chunkOffset = new int[chunkedDataset.getChunkDimensions().length]; System.out.println("Chunk offset: " + ArrayUtils.toString(chunkOffset)); ByteBuffer rawChunkBuffer = chunkedDataset.getRawChunkBuffer(chunkOffset); byte[] byteArray = new byte[rawChunkBuffer.capacity()]; rawChunkBuffer.get(byteArray); System.out.println("Raw bytes: " + ArrayUtils.toString(byteArray)); } else { throw new IllegalArgumentException("Dataset is not chunked"); } } }  static void main(String[] args);  }