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
* This implementation guarantees that it will read as many bytes
1870
1871
* as possible before giving up; this may not always be the case for
1871
1872
* subclasses of {@link InputStream}.
1873
+
* </p>
1872
1874
*
1873
1875
* @param input where to read input from.
1874
1876
* @param buffer destination.
@@ -1882,9 +1884,11 @@ public static int read(final InputStream input, final byte[] buffer) throws IOEx
1882
1884
1883
1885
/**
1884
1886
* Reads bytes from an input stream.
1887
+
* <p>
1885
1888
* This implementation guarantees that it will read as many bytes
1886
1889
* as possible before giving up; this may not always be the case for
1887
1890
* subclasses of {@link InputStream}.
1891
+
* </p>
1888
1892
*
1889
1893
* @param input where to read input.
1890
1894
* @param buffer destination.
@@ -1960,9 +1964,11 @@ public static int read(final ReadableByteChannel input, final ByteBuffer buffer)
1960
1964
1961
1965
/**
1962
1966
* Reads characters from an input character stream.
1967
+
* <p>
1963
1968
* This implementation guarantees that it will read as many characters
1964
1969
* as possible before giving up; this may not always be the case for
1965
1970
* subclasses of {@link Reader}.
1971
+
* </p>
1966
1972
*
1967
1973
* @param reader where to read input from.
1968
1974
* @param buffer destination.
@@ -1976,9 +1982,11 @@ public static int read(final Reader reader, final char[] buffer) throws IOExcept
1976
1982
1977
1983
/**
1978
1984
* Reads characters from an input character stream.
1985
+
* <p>
1979
1986
* This implementation guarantees that it will read as many characters
1980
1987
* as possible before giving up; this may not always be the case for
1981
1988
* subclasses of {@link Reader}.
1989
+
* </p>
1982
1990
*
1983
1991
* @param reader where to read input from.
1984
1992
* @param buffer destination.
@@ -2336,18 +2344,18 @@ public static URL resourceToURL(final String name, final ClassLoader classLoader
2336
2344
2337
2345
/**
2338
2346
* Skips bytes from an input byte stream.
2339
-
* This implementation guarantees that it will read as many bytes
2340
-
* as possible before giving up; this may not always be the case for
2341
-
* skip() implementations in subclasses of {@link InputStream}.
2342
2347
* <p>
2343
-
* Note that the implementation uses {@link InputStream#read(byte[], int, int)} rather
2344
-
* than delegating to {@link InputStream#skip(long)}.
2345
-
* This means that the method may be considerably less efficient than using the actual skip implementation,
2346
-
* this is done to guarantee that the correct number of bytes are skipped.
2348
+
* This implementation guarantees that it will read as many bytes as possible before giving up; this may not always be the case for skip() implementations
2349
+
* in subclasses of {@link InputStream}.
2350
+
* </p>
2351
+
* <p>
2352
+
* Note that the implementation uses {@link InputStream#read(byte[], int, int)} rather than delegating to {@link InputStream#skip(long)}. This means that
2353
+
* the method may be considerably less efficient than using the actual skip implementation, this is done to guarantee that the correct number of bytes are
2354
+
* skipped.
2347
2355
* </p>
2348
2356
*
2349
2357
* @param input byte stream to skip.
2350
-
* @param skip number of bytes to skip.
2358
+
* @param skip number of bytes to skip.
2351
2359
* @return number of bytes actually skipped.
2352
2360
* @throws IOException if there is a problem reading the file.
2353
2361
* @throws IllegalArgumentException if toSkip is negative.
@@ -2583,22 +2591,18 @@ public static void skipFully(final Reader reader, final long toSkip) throws IOEx
2583
2591
}
2584
2592
2585
2593
/**
2586
-
* Fetches entire contents of an {@link InputStream} and represent
2587
-
* same data as result InputStream.
2594
+
* Fetches entire contents of an {@link InputStream} and represent same data as result InputStream.
2588
2595
* <p>
2589
2596
* This method is useful where,
2590
2597
* </p>
2591
2598
* <ul>
2592
2599
* <li>Source InputStream is slow.</li>
2593
-
* <li>It has network resources associated, so we cannot keep it open for
2594
-
* long time.</li>
2600
+
* <li>It has network resources associated, so we cannot keep it open for long time.</li>
2595
2601
* <li>It has network timeout associated.</li>
2596
2602
* </ul>
2597
2603
* <p>
2598
-
* It can be used in favor of {@link #toByteArray(InputStream)}, since it
2599
-
* avoids unnecessary allocation and copy of byte[].<br>
2600
-
* This method buffers the input internally, so there is no need to use a
2601
-
* {@link BufferedInputStream}.
2604
+
* It can be used in favor of {@link #toByteArray(InputStream)}, since it avoids unnecessary allocation and copy of byte[].<br>
2605
+
* This method buffers the input internally, so there is no need to use a {@link BufferedInputStream}.
0 commit comments