@@ -537,7 +537,9 @@ public static byte[] toByteArray(final InputStream input, final int size) throws
537537 * @return the requested byte array
538538 * @throws NullPointerException if the input is null
539539 * @throws IOException if an I/O error occurs
540+ * @deprecated 2.5 use {@link #toByteArray(Reader, Charset)} instead
540541 */
542+ @ Deprecated
541543 public static byte [] toByteArray (final Reader input ) throws IOException {
542544 return toByteArray (input , Charset .defaultCharset ());
543545 }
@@ -596,7 +598,7 @@ public static byte[] toByteArray(final Reader input, final String encoding) thro
596598 * @return the requested byte array
597599 * @throws NullPointerException if the input is null
598600 * @throws IOException if an I/O error occurs (never occurs)
599- * @deprecated Use {@link String#getBytes()}
601+ * @deprecated 2.5 Use {@link String#getBytes()} instead
600602 */
601603 @ Deprecated
602604 public static byte [] toByteArray (final String input ) throws IOException {
@@ -676,7 +678,9 @@ public static byte[] toByteArray(final URLConnection urlConn) throws IOException
676678 * @throws NullPointerException if the input is null
677679 * @throws IOException if an I/O error occurs
678680 * @since 1.1
681+ * @deprecated 2.5 use {@link #toCharArray(InputStream, Charset)} instead
679682 */
683+ @ Deprecated
680684 public static char [] toCharArray (final InputStream is ) throws IOException {
681685 return toCharArray (is , Charset .defaultCharset ());
682686 }
@@ -757,7 +761,9 @@ public static char[] toCharArray(final Reader input) throws IOException {
757761 * @return the requested String
758762 * @throws NullPointerException if the input is null
759763 * @throws IOException if an I/O error occurs
764+ * @deprecated 2.5 use {@link #toString(InputStream, Charset)} instead
760765 */
766+ @ Deprecated
761767 public static String toString (final InputStream input ) throws IOException {
762768 return toString (input , Charset .defaultCharset ());
763769 }
@@ -831,7 +837,9 @@ public static String toString(final Reader input) throws IOException {
831837 * @return The contents of the URL as a String.
832838 * @throws IOException if an I/O exception occurs.
833839 * @since 2.1
840+ * @deprecated 2.5 use {@link #toString(URI, Charset)} instead
834841 */
842+ @ Deprecated
835843 public static String toString (final URI uri ) throws IOException {
836844 return toString (uri , Charset .defaultCharset ());
837845 }
@@ -877,7 +885,9 @@ public static String toString(final URI uri, final String encoding) throws IOExc
877885 * @return The contents of the URL as a String.
878886 * @throws IOException if an I/O exception occurs.
879887 * @since 2.1
888+ * @deprecated 2.5 use {@link #toString(URL, Charset)} instead
880889 */
890+ @ Deprecated
881891 public static String toString (final URL url ) throws IOException {
882892 return toString (url , Charset .defaultCharset ());
883893 }
@@ -928,7 +938,7 @@ public static String toString(final URL url, final String encoding) throws IOExc
928938 * @return the requested String
929939 * @throws NullPointerException if the input is null
930940 * @throws IOException if an I/O error occurs (never occurs)
931- * @deprecated Use {@link String#String(byte[])}
941+ * @deprecated 2.5 Use {@link String#String(byte[])} instead
932942 */
933943 @ Deprecated
934944 public static String toString (final byte [] input ) throws IOException {
@@ -967,7 +977,9 @@ public static String toString(final byte[] input, final String encoding) throws
967977 * @throws NullPointerException if the input is null
968978 * @throws IOException if an I/O error occurs
969979 * @since 1.1
980+ * @deprecated 2.5 use {@link #readLines(InputStream, Charset)} instead
970981 */
982+ @ Deprecated
971983 public static List <String > readLines (final InputStream input ) throws IOException {
972984 return readLines (input , Charset .defaultCharset ());
973985 }
@@ -1151,7 +1163,9 @@ public static LineIterator lineIterator(final InputStream input, final String en
11511163 * @param input the CharSequence to convert
11521164 * @return an input stream
11531165 * @since 2.0
1166+ * @deprecated 2.5 use {@link #toInputStream(CharSequence, Charset)} instead
11541167 */
1168+ @ Deprecated
11551169 public static InputStream toInputStream (final CharSequence input ) {
11561170 return toInputStream (input , Charset .defaultCharset ());
11571171 }
@@ -1197,7 +1211,9 @@ public static InputStream toInputStream(final CharSequence input, final String e
11971211 * @param input the string to convert
11981212 * @return an input stream
11991213 * @since 1.1
1214+ * @deprecated 2.5 use {@link #toInputStream(String, Charset)} instead
12001215 */
1216+ @ Deprecated
12011217 public static InputStream toInputStream (final String input ) {
12021218 return toInputStream (input , Charset .defaultCharset ());
12031219 }
@@ -1267,7 +1283,9 @@ public static void write(final byte[] data, final OutputStream output)
12671283 * @throws NullPointerException if output is null
12681284 * @throws IOException if an I/O error occurs
12691285 * @since 1.1
1286+ * @deprecated 2.5 use {@link #write(byte[], Writer, Charset)} instead
12701287 */
1288+ @ Deprecated
12711289 public static void write (final byte [] data , final Writer output ) throws IOException {
12721290 write (data , output , Charset .defaultCharset ());
12731291 }
@@ -1348,7 +1366,9 @@ public static void write(final char[] data, final Writer output) throws IOExcept
13481366 * @throws NullPointerException if output is null
13491367 * @throws IOException if an I/O error occurs
13501368 * @since 1.1
1369+ * @deprecated 2.5 use {@link #write(char[], OutputStream, Charset)} instead
13511370 */
1371+ @ Deprecated
13521372 public static void write (final char [] data , final OutputStream output )
13531373 throws IOException {
13541374 write (data , output , Charset .defaultCharset ());
@@ -1430,7 +1450,9 @@ public static void write(final CharSequence data, final Writer output) throws IO
14301450 * @throws NullPointerException if output is null
14311451 * @throws IOException if an I/O error occurs
14321452 * @since 2.0
1453+ * @deprecated 2.5 use {@link #write(CharSequence, OutputStream, Charset)} instead
14331454 */
1455+ @ Deprecated
14341456 public static void write (final CharSequence data , final OutputStream output )
14351457 throws IOException {
14361458 write (data , output , Charset .defaultCharset ());
@@ -1507,7 +1529,9 @@ public static void write(final String data, final Writer output) throws IOExcept
15071529 * @throws NullPointerException if output is null
15081530 * @throws IOException if an I/O error occurs
15091531 * @since 1.1
1532+ * @deprecated 2.5 use {@link #write(String, OutputStream, Charset)} instead
15101533 */
1534+ @ Deprecated
15111535 public static void write (final String data , final OutputStream output )
15121536 throws IOException {
15131537 write (data , output , Charset .defaultCharset ());
@@ -1636,7 +1660,9 @@ public static void write(final StringBuffer data, final OutputStream output, fin
16361660 * @throws NullPointerException if the output is null
16371661 * @throws IOException if an I/O error occurs
16381662 * @since 1.1
1663+ * @deprecated 2.5 use {@link #writeLines(Collection, String, OutputStream, Charset)} instead
16391664 */
1665+ @ Deprecated
16401666 public static void writeLines (final Collection <?> lines , final String lineEnding ,
16411667 final OutputStream output ) throws IOException {
16421668 writeLines (lines , lineEnding , output , Charset .defaultCharset ());
@@ -1918,7 +1944,9 @@ public static long copyLarge(final InputStream input, final OutputStream output,
19181944 * @throws NullPointerException if the input or output is null
19191945 * @throws IOException if an I/O error occurs
19201946 * @since 1.1
1947+ * @deprecated 2.5 use {@link #copy(InputStream, Writer, Charset)} instead
19211948 */
1949+ @ Deprecated
19221950 public static void copy (final InputStream input , final Writer output )
19231951 throws IOException {
19241952 copy (input , output , Charset .defaultCharset ());
@@ -2129,7 +2157,9 @@ public static long copyLarge(final Reader input, final Writer output, final long
21292157 * @throws NullPointerException if the input or output is null
21302158 * @throws IOException if an I/O error occurs
21312159 * @since 1.1
2160+ * @deprecated 2.5 use {@link #copy(Reader, OutputStream, Charset)} instead
21322161 */
2162+ @ Deprecated
21332163 public static void copy (final Reader input , final OutputStream output )
21342164 throws IOException {
21352165 copy (input , output , Charset .defaultCharset ());
0 commit comments