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 34
34
35
35
import org .scijava .io .ByteArrayByteBank ;
36
36
import org .scijava .io .ByteBank ;
37
+ import org .scijava .io .handle .DataHandle ;
37
38
import org .scijava .util .ByteArray ;
38
39
39
40
/**
@@ -57,8 +58,9 @@ public BytesLocation(final ByteBank bytes) {
57
58
}
58
59
59
60
/**
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}.
62
64
*/
63
65
public BytesLocation (final int initialCapacity ) {
64
66
this .bytes = new ByteArrayByteBank (initialCapacity );
@@ -84,7 +86,11 @@ public BytesLocation(final byte[] bytes) {
84
86
85
87
/**
86
88
* 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
88
94
*/
89
95
public BytesLocation (final byte [] bytes , final int offset ,
90
96
final int length )
You can’t perform that action at this time.
0 commit comments