diff options
author | Sven Gothel <[email protected]> | 2023-05-04 00:49:57 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-05-04 00:49:57 +0200 |
commit | 6e67a7b54af82aa4e4ec28f50ff08a26f9d80627 (patch) | |
tree | 959259019e0038922793f4d8d5850ec6e26a0b90 /src | |
parent | 69d22df0a6132dbf8b88fd04090c0bc81129237f (diff) |
IOUtil.copyStream2Byte{Array|Buffer}(..): API Doc: Clarify that the complete stream is copied.
Diffstat (limited to 'src')
-rw-r--r-- | src/java/com/jogamp/common/util/IOUtil.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/java/com/jogamp/common/util/IOUtil.java b/src/java/com/jogamp/common/util/IOUtil.java index 32e7505..499fa1b 100644 --- a/src/java/com/jogamp/common/util/IOUtil.java +++ b/src/java/com/jogamp/common/util/IOUtil.java @@ -257,7 +257,7 @@ public class IOUtil { } /** - * Copy the specified input stream to a byte array, which is being returned. + * Copy the complete specified input stream to a byte array, which is being returned. */ public static byte[] copyStream2ByteArray(InputStream stream) throws IOException { if( !(stream instanceof BufferedInputStream) ) { @@ -290,8 +290,7 @@ public class IOUtil { } /** - * Copy the specified input stream to a NIO ByteBuffer w/ native byte order, which is being returned. - * <p>The implementation creates the ByteBuffer w/ {@link #copyStream2ByteArray(InputStream)}'s returned byte array.</p> + * Copy the complete specified input stream to a NIO ByteBuffer w/ native byte order, which is being returned. * * @param stream input stream, which will be wrapped into a BufferedInputStream, if not already done. */ @@ -300,11 +299,10 @@ public class IOUtil { } /** - * Copy the specified input stream to a NIO ByteBuffer w/ native byte order, which is being returned. - * <p>The implementation creates the ByteBuffer w/ {@link #copyStream2ByteArray(InputStream)}'s returned byte array.</p> + * Copy the complete specified input stream to a NIO ByteBuffer w/ native byte order, which is being returned. * * @param stream input stream, which will be wrapped into a BufferedInputStream, if not already done. - * @param initialCapacity initial buffer capacity in bytes, if > available bytes + * @param initialCapacity initial buffer capacity in bytes, if < currently available bytes, initial buffer capacity is set to currently available bytes. */ public static ByteBuffer copyStream2ByteBuffer(InputStream stream, int initialCapacity) throws IOException { if( !(stream instanceof BufferedInputStream) ) { |