You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/org/apache/commons/io/channels/ByteArraySeekableByteChannel.java
+91-62Lines changed: 91 additions & 62 deletions
Original file line number
Diff line number
Diff line change
@@ -25,38 +25,34 @@
25
25
importjava.nio.channels.SeekableByteChannel;
26
26
importjava.util.Arrays;
27
27
importjava.util.concurrent.atomic.AtomicBoolean;
28
+
importjava.util.concurrent.locks.ReentrantLock;
28
29
29
30
importorg.apache.commons.io.IOUtils;
30
31
31
32
/**
32
33
* A {@link SeekableByteChannel} implementation backed by a byte array.
33
34
* <p>
34
-
* When this channel is used for writing, an internal buffer grows to accommodate incoming data. The natural size limit is the value of
35
-
* {@link Integer#MAX_VALUE} and it's not possible to {@link #position(long) set the position} or {@link #truncate(long) truncate} to a value bigger than that.
36
-
* The raw internal buffer is accessed via {@link ByteArraySeekableByteChannel#array()}.
37
-
* </p>
38
-
* <p>
39
-
* This class never throws {@link ClosedChannelException} because a byte array is not a resource you open or close.
40
-
* </p>
41
-
* <p>
42
-
* This class isn't thread-safe.
35
+
* When used for writing, the internal buffer grows to accommodate incoming data. The natural size limit is the value of {@link IOUtils#SOFT_MAX_ARRAY_LENGTH}
36
+
* and it's not possible to {@link #position(long) set the position} or {@link #truncate(long) truncate} to a value bigger than that. The raw internal buffer is
37
+
* accessed via {@link ByteArraySeekableByteChannel#array()}.
0 commit comments