Package dev.zarr.zarrjava.core
Class Array
java.lang.Object
dev.zarr.zarrjava.core.AbstractNode
dev.zarr.zarrjava.core.Array
- All Implemented Interfaces:
Node
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class dev.zarr.zarrjava.core.AbstractNode
storeHandle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccess()abstract ArrayMetadatametadata()static Arrayopen(StoreHandle storeHandle) Opens an existing Zarr array at a specified storage location.static ArrayOpens an existing Zarr array at a specified storage location.static ArrayOpens an existing Zarr array at a specified storage location.ucar.ma2.Arrayread()Reads the entire Zarr array into an ucar.ma2.Array.ucar.ma2.Arrayread(boolean parallel) Reads the entire Zarr array into an ucar.ma2.Array.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.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.ucar.ma2.ArrayreadChunk(long[] chunkCoords) Reads one chunk of the Zarr array as specified by the chunk coordinates into an ucar.ma2.Array.voidwrite(long[] offset, ucar.ma2.Array array) Writes a ucar.ma2.Array into the Zarr array at a specified offset.voidwrite(long[] offset, ucar.ma2.Array array, boolean parallel) Writes a ucar.ma2.Array into the Zarr array at a specified offset.voidwrite(ucar.ma2.Array array) Writes a ucar.ma2.Array into the Zarr array at the beginning of the Zarr array.voidwrite(ucar.ma2.Array array, boolean parallel) Writes a ucar.ma2.Array into the Zarr array at the beginning of the Zarr array.voidwriteChunk(long[] chunkCoords, ucar.ma2.Array chunkArray) Writes one chunk into the Zarr array as specified by the chunk coordinates.
-
Field Details
-
codecPipeline
-
-
Constructor Details
-
Array
- Throws:
ZarrException
-
-
Method Details
-
metadata
-
open
Opens an existing Zarr array at a specified storage location. Automatically detects the Zarr version.- Parameters:
storeHandle- the storage location of the Zarr array- Throws:
IOException- throws IOException if the metadata cannot be readZarrException- throws ZarrException if the Zarr array cannot be opened
-
open
Opens an existing Zarr array at a specified storage location. Automatically detects the Zarr version.- Parameters:
path- the storage location of the Zarr array- Throws:
IOException- throws IOException if the metadata cannot be readZarrException- throws ZarrException if the Zarr array cannot be opened
-
open
Opens an existing Zarr array at a specified storage location. Automatically detects the Zarr version.- Parameters:
path- the storage location of the Zarr array- Throws:
IOException- throws IOException if the metadata cannot be readZarrException- throws ZarrException if the Zarr array cannot be opened
-
write
public 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
public 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
public 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
public 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
-
read
@Nonnull public 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
-