@@ -112,7 +112,10 @@ private boolean partOfChunkIsOutsideDataset(final int chunkInternalOffsetIndex,
112
112
/**
113
113
* Calculates the linear offsets into the dataset for each of the chunks internal offsets. It can be thought of as
114
114
* only doing this do the first chunk as to calculate the offsets required for any other chunk you need to add
115
- * the inital linear offset of that chunk to each of these values.
115
+ * the initial linear offset of that chunk to each of these values.
116
+ *
117
+ * @param chunkInternalOffsets a chunk offset
118
+ * @return offset in the dataset
116
119
*/
117
120
protected int [] getDataOffsets (int [] chunkInternalOffsets ) {
118
121
@@ -165,6 +168,8 @@ public ByteBuffer getDataBuffer() {
165
168
166
169
/**
167
170
* Gets the number of linear steps to move for one step in the corresponding dimension
171
+ *
172
+ * @return array of the number of linear step to move for one step in each dimension
168
173
*/
169
174
private int [] getDimensionLinearOffsets () {
170
175
int dimLength = getDimensions ().length ;
@@ -181,6 +186,10 @@ private int[] getDimensionLinearOffsets() {
181
186
182
187
/**
183
188
* Gets the offsets inside a chunk where a contiguous run of data starts.
189
+ *
190
+ * @param chunkDimensions the dimensions of each chunk
191
+ * @param elementSize number of bytes in a an dataset element
192
+ * @return an array of locations inside the chunk where contiguous data starts
184
193
*/
185
194
protected int [] getChunkInternalOffsets (int [] chunkDimensions , int elementSize ) {
186
195
final int fastestChunkDim = chunkDimensions [chunkDimensions .length - 1 ];
@@ -198,6 +207,9 @@ protected int[] getChunkInternalOffsets(int[] chunkDimensions, int elementSize)
198
207
/**
199
208
* A partial chunk is one that is not completely inside the dataset. i.e. some of its contents are not part of the
200
209
* dataset
210
+ *
211
+ * @param chunk The chunk to test
212
+ * @return true if this is a partial chunk
201
213
*/
202
214
private boolean isPartialChunk (Chunk chunk ) {
203
215
final int [] datasetDims = getDimensions ();
0 commit comments