33import com .fasterxml .jackson .databind .ObjectMapper ;
44import dev .zarr .zarrjava .ZarrException ;
55import dev .zarr .zarrjava .store .StoreHandle ;
6- import dev .zarr .zarrjava .utils .MultiArrayUtils ;
76import dev .zarr .zarrjava .utils .Utils ;
87import dev .zarr .zarrjava .v3 .codec .CodecPipeline ;
98import java .io .IOException ;
@@ -21,7 +20,7 @@ public class Array extends Node implements dev.zarr.zarrjava.interfaces.Array {
2120 CodecPipeline codecPipeline ;
2221
2322 protected Array (StoreHandle storeHandle , ArrayMetadata arrayMetadata )
24- throws IOException , ZarrException {
23+ throws ZarrException {
2524 super (storeHandle );
2625 this .metadata = arrayMetadata ;
2726 this .codecPipeline = new CodecPipeline (arrayMetadata .codecs , arrayMetadata .coreArrayMetadata );
@@ -30,9 +29,9 @@ protected Array(StoreHandle storeHandle, ArrayMetadata arrayMetadata)
3029 /**
3130 * Opens an existing Zarr array at a specified storage location.
3231 *
33- * @param storeHandle
34- * @throws IOException
35- * @throws ZarrException
32+ * @param storeHandle the storage location of the Zarr array
33+ * @throws IOException throws IOException if the metadata cannot be read
34+ * @throws ZarrException throws ZarrException if the Zarr array cannot be opened
3635 */
3736 public static Array open (StoreHandle storeHandle ) throws IOException , ZarrException {
3837 return new Array (
@@ -50,10 +49,10 @@ public static Array open(StoreHandle storeHandle) throws IOException, ZarrExcept
5049 * method will raise an exception if a Zarr array already exists at the specified storage
5150 * location.
5251 *
53- * @param storeHandle
54- * @param arrayMetadata
55- * @throws IOException
56- * @throws ZarrException
52+ * @param storeHandle the storage location of the Zarr array
53+ * @param arrayMetadata the metadata of the Zarr array
54+ * @throws IOException if the metadata cannot be serialized
55+ * @throws ZarrException if the Zarr array cannot be created
5756 */
5857 public static Array create (StoreHandle storeHandle , ArrayMetadata arrayMetadata )
5958 throws IOException , ZarrException {
@@ -65,11 +64,11 @@ public static Array create(StoreHandle storeHandle, ArrayMetadata arrayMetadata)
6564 * `existsOk` is false, this method will raise an exception if a Zarr array already exists at the
6665 * specified storage location.
6766 *
68- * @param storeHandle
69- * @param arrayMetadata
70- * @param existsOk
71- * @throws IOException
72- * @throws ZarrException
67+ * @param storeHandle the storage location of the Zarr array
68+ * @param arrayMetadata the metadata of the Zarr array
69+ * @param existsOk if true, no exception is raised if the Zarr array already exists
70+ * @throws IOException throws IOException if the metadata cannot be serialized
71+ * @throws ZarrException throws ZarrException if the Zarr array cannot be created
7372 */
7473 public static Array create (StoreHandle storeHandle , ArrayMetadata arrayMetadata , boolean existsOk )
7574 throws IOException , ZarrException {
@@ -91,11 +90,12 @@ public static Array create(StoreHandle storeHandle, ArrayMetadata arrayMetadata,
9190 * be used to construct the metadata of the Zarr array. If `existsOk` is false, this method will
9291 * raise an exception if a Zarr array already exists at the specified storage location.
9392 *
94- * @param storeHandle
95- * @param arrayMetadataBuilderMapper
96- * @param existsOk
97- * @throws IOException
98- * @throws ZarrException
93+ * @param storeHandle the storage location of the Zarr array
94+ * @param arrayMetadataBuilderMapper a callback of ArrayMetadataBuilder -> ArrayMetadataBuilder that is
95+ * used to construct the metadata of the Zarr array
96+ * @param existsOk if true, no exception is raised if the Zarr array already exists
97+ * @throws IOException if the metadata cannot be serialized
98+ * @throws ZarrException if the Zarr array cannot be created
9999 */
100100 public static Array create (StoreHandle storeHandle ,
101101 Function <ArrayMetadataBuilder , ArrayMetadataBuilder > arrayMetadataBuilderMapper ,
@@ -142,9 +142,9 @@ private Array writeMetadata(ArrayMetadata newArrayMetadata) throws ZarrException
142142 * deleted. This method returns a new instance of the Zarr array class and the old instance
143143 * becomes invalid.
144144 *
145- * @param newShape
146- * @throws ZarrException
147- * @throws IOException
145+ * @param newShape the new shape of the Zarr array
146+ * @throws ZarrException if the new metadata is invalid
147+ * @throws IOException throws IOException if the new metadata cannot be serialized
148148 */
149149 public Array resize (long [] newShape ) throws ZarrException , IOException {
150150 if (newShape .length != metadata .ndim ()) {
@@ -162,9 +162,9 @@ public Array resize(long[] newShape) throws ZarrException, IOException {
162162 * Sets the attributes of the Zarr array. It overwrites and removes any existing attributes. This
163163 * method returns a new instance of the Zarr array class and the old instance becomes invalid.
164164 *
165- * @param newAttributes
166- * @throws ZarrException
167- * @throws IOException
165+ * @param newAttributes the new attributes of the Zarr array
166+ * @throws ZarrException throws ZarrException if the new metadata is invalid
167+ * @throws IOException throws IOException if the new metadata cannot be serialized
168168 */
169169 public Array setAttributes (Map <String , Object > newAttributes ) throws ZarrException , IOException {
170170 ArrayMetadata newArrayMetadata =
@@ -180,9 +180,10 @@ public Array setAttributes(Map<String, Object> newAttributes) throws ZarrExcepti
180180 * callback may be mutated. This method overwrites and removes any existing attributes. This
181181 * method returns a new instance of the Zarr array class and the old instance becomes invalid.
182182 *
183- * @param attributeMapper
184- * @throws ZarrException
185- * @throws IOException
183+ * @param attributeMapper a callback of Map<String, Object> -> Map<String, Object> that is used to construct the new
184+ * attributes
185+ * @throws ZarrException throws ZarrException if the new metadata is invalid
186+ * @throws IOException throws IOException if the new metadata cannot be serialized
186187 */
187188 public Array updateAttributes (Function <Map <String , Object >, Map <String , Object >> attributeMapper )
188189 throws ZarrException , IOException {
0 commit comments