Package dev.zarr.zarrjava.core
Interface Array
public interface Array
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault Array.ArrayAccessoraccess()default booleanchunkIsInArray(long[] chunkCoords) metadata()default ucar.ma2.Arrayread()Reads the entire Zarr array into an ucar.ma2.Array.default ucar.ma2.Arrayread(boolean parallel) Reads the entire Zarr array into an ucar.ma2.Array.default ucar.ma2.Arrayread(long[] offset, int[] shape) Reads a part of the Zarr array based on a requested offset and shape into an ucar.ma2.Array.default ucar.ma2.Arrayread(long[] offset, int[] shape, boolean parallel) Reads a part of the Zarr array based on a requested offset and shape into an ucar.ma2.Array.default ucar.ma2.ArrayreadChunk(long[] chunkCoords) Reads one chunk of the Zarr array as specified by the chunk coordinates into an ucar.ma2.Array.default voidwrite(long[] offset, ucar.ma2.Array array) Writes a ucar.ma2.Array into the Zarr array at a specified offset.default voidwrite(long[] offset, ucar.ma2.Array array, boolean parallel) Writes a ucar.ma2.Array into the Zarr array at a specified offset.default voidwrite(ucar.ma2.Array array) Writes a ucar.ma2.Array into the Zarr array at the beginning of the Zarr array.default voidwrite(ucar.ma2.Array array, boolean parallel) Writes a ucar.ma2.Array into the Zarr array at the beginning of the Zarr array.default voidwriteChunk(long[] chunkCoords, ucar.ma2.Array chunkArray) Writes one chunk into the Zarr array as specified by the chunk coordinates.
-
Method Details
-
metadata
ArrayMetadata metadata() -
storeHandle
StoreHandle storeHandle() -
codecPipeline
CodecPipeline codecPipeline() -
write
default void write(long[] offset, ucar.ma2.Array array, boolean parallel) Writes a ucar.ma2.Array into the Zarr array at a specified offset. The shape of the Zarr array needs be large enough for the write.- Parameters:
offset- the offset where to write the dataarray- the data to writeparallel- utilizes parallelism if true
-
writeChunk
Writes one chunk into the Zarr array as specified by the chunk coordinates. The shape of the Zarr array needs to be large enough to write.- Parameters:
chunkCoords- The coordinates of the chunk as computed by the offset of the chunk divided by the chunk shape.chunkArray- The data to write into the chunk- Throws:
ZarrException- throws ZarrException if the write fails
-
readChunk
Reads one chunk of the Zarr array as specified by the chunk coordinates into an ucar.ma2.Array.- Parameters:
chunkCoords- The coordinates of the chunk as computed by the offset of the chunk divided by the chunk shape.- Throws:
ZarrException- throws ZarrException if the requested chunk is outside the array's domain or if the read fails
-
write
default void write(ucar.ma2.Array array) Writes a ucar.ma2.Array into the Zarr array at the beginning of the Zarr array. The shape of the Zarr array needs be large enough for the write. Utilizes no parallelism.- Parameters:
array- the data to write
-
write
default void write(long[] offset, ucar.ma2.Array array) Writes a ucar.ma2.Array into the Zarr array at a specified offset. The shape of the Zarr array needs be large enough for the write. Utilizes no parallelism.- Parameters:
offset- the offset where to write the dataarray- the data to write
-
write
default void write(ucar.ma2.Array array, boolean parallel) Writes a ucar.ma2.Array into the Zarr array at the beginning of the Zarr array. The shape of the Zarr array needs be large enough for the write.- Parameters:
array- the data to writeparallel- utilizes parallelism if true
-
read
Reads the entire Zarr array into an ucar.ma2.Array. Utilizes no parallelism.- Throws:
ZarrException- throws ZarrException if the read fails
-
read
Reads a part of the Zarr array based on a requested offset and shape into an ucar.ma2.Array. Utilizes no parallelism.- Parameters:
offset- the offset where to start readingshape- the shape of the data to read- Throws:
ZarrException- throws ZarrException if the requested data is outside the array's domain or if the read fails
-
read
Reads the entire Zarr array into an ucar.ma2.Array.- Parameters:
parallel- utilizes parallelism if true- Throws:
ZarrException- throws ZarrException if the requested data is outside the array's domain or if the read fails
-
chunkIsInArray
default boolean chunkIsInArray(long[] chunkCoords) -
read
@Nonnull default ucar.ma2.Array read(long[] offset, int[] shape, boolean parallel) throws ZarrException Reads a part of the Zarr array based on a requested offset and shape into an ucar.ma2.Array.- Parameters:
offset- the offset where to start readingshape- the shape of the data to readparallel- utilizes parallelism if true- Throws:
ZarrException- throws ZarrException if the requested data is outside the array's domain or if the read fails
-
access
-