File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/main/java/org/scijava/io/location Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 3434
3535import org .scijava .io .ByteArrayByteBank ;
3636import org .scijava .io .ByteBank ;
37+ import org .scijava .io .handle .DataHandle ;
3738import org .scijava .util .ByteArray ;
3839
3940/**
@@ -57,8 +58,9 @@ public BytesLocation(final ByteBank bytes) {
5758 }
5859
5960 /**
60- * Creates a {@link BytesLocation} backed by a {@link ByteArrayByteBank}
61- * with the specified initial capacity.
61+ * Creates a {@link BytesLocation} backed by a {@link ByteArrayByteBank} with
62+ * the specified initial capacity, but with a reported size of 0. This method
63+ * can be used to avoid needing to grow the underlying {@link ByteBank}.
6264 */
6365 public BytesLocation (final int initialCapacity ) {
6466 this .bytes = new ByteArrayByteBank (initialCapacity );
@@ -84,7 +86,11 @@ public BytesLocation(final byte[] bytes) {
8486
8587 /**
8688 * Creates a {@link BytesLocation} backed by a {@link ByteArrayByteBank} with
87- * the specified initial capacity.
89+ * the specified initial capacity and the provided data.
90+ *
91+ * @param bytes the bytes to copy into the new {@link BytesLocation}
92+ * @param offset the offset in the bytes array to start copying from
93+ * @param length the number of bytes to copy, starting from the offset
8894 */
8995 public BytesLocation (final byte [] bytes , final int offset ,
9096 final int length )
You can’t perform that action at this time.
0 commit comments