Example usage for Java org.apache.commons.io IOUtils fields, constructors, methods, implement or subclass
The text is from its open source code.
char | DIR_SEPARATOR_UNIX The Unix directory separator character. |
char | DIR_SEPARATOR The system directory separator character. |
String | LINE_SEPARATOR_UNIX The Unix line separator string. |
String | LINE_SEPARATOR_WINDOWS The Windows line separator string. |
String | LINE_SEPARATOR The system line separator string. |
IOUtils() Instances should NOT be constructed in standard programming. |
void | closeQuietly(Reader input) Unconditionally close an Reader . |
void | closeQuietly(Writer output) Unconditionally close a Writer . |
void | closeQuietly(InputStream input) Unconditionally close an InputStream . |
void | closeQuietly(OutputStream output) Unconditionally close an OutputStream . |
boolean | contentEquals(InputStream input1, InputStream input2) Compare the contents of two Streams to determine if they are equal or not. |
boolean | contentEquals(Reader input1, Reader input2) Compare the contents of two Readers to determine if they are equal or not. |
int | copy(InputStream input, OutputStream output) Copy bytes from an InputStream to an OutputStream . |
void | copy(InputStream input, Writer output) Copy bytes from an InputStream to chars on a Writer using the default character encoding of the platform. |
int | copy(Reader input, Writer output) Copy chars from a Reader to a Writer . |
void | copy(Reader input, OutputStream output) Copy chars from a Reader to bytes on an OutputStream using the default character encoding of the platform, and calling flush. |
void | copy(InputStream input, Writer output, String encoding) Copy bytes from an InputStream to chars on a Writer using the specified character encoding. |
void | copy(Reader input, OutputStream output, String encoding) Copy chars from a Reader to bytes on an OutputStream using the specified character encoding, and calling flush. |
long | copyLarge(InputStream input, OutputStream output) Copy bytes from a large (over 2GB) InputStream to an OutputStream . |
long | copyLarge(Reader input, Writer output) Copy chars from a large (over 2GB) Reader to a Writer . |
LineIterator | lineIterator(InputStream input, String encoding) Return an Iterator for the lines in an InputStream , using the character encoding specified (or default encoding if null). |
LineIterator | lineIterator(Reader reader) Return an Iterator for the lines in a Reader . |
List | readLines(InputStream input) Get the contents of an InputStream as a list of Strings, one entry per line, using the default character encoding of the platform. |
List | readLines(Reader input) Get the contents of a Reader as a list of Strings, one entry per line. |
List | readLines(InputStream input, String encoding) Get the contents of an InputStream as a list of Strings, one entry per line, using the specified character encoding. |
byte[] | toByteArray(InputStream input) Get the contents of an InputStream as a byte[] . |
byte[] | toByteArray(Reader input) Get the contents of a Reader as a byte[] using the default character encoding of the platform. |
byte[] | toByteArray(String input) Get the contents of a String as a byte[] using the default character encoding of the platform. |
byte[] | toByteArray(Reader input, String encoding) Get the contents of a Reader as a byte[] using the specified character encoding. |
char[] | toCharArray(InputStream is) Get the contents of an InputStream as a character array using the default character encoding of the platform. |
char[] | toCharArray(Reader input) Get the contents of a Reader as a character array. |
char[] | toCharArray(InputStream is, String encoding) Get the contents of an InputStream as a character array using the specified character encoding. |
InputStream | toInputStream(String input) Convert the specified string to an input stream, encoded as bytes using the default character encoding of the platform. |
InputStream | toInputStream(String input, String encoding) Convert the specified string to an input stream, encoded as bytes using the specified character encoding. |
String | toString(InputStream input) Get the contents of an InputStream as a String using the default character encoding of the platform. |
String | toString(Reader input) Get the contents of a Reader as a String. |
String | toString(byte[] input) Get the contents of a byte[] as a String using the default character encoding of the platform. |
String | toString(InputStream input, String encoding) Get the contents of an InputStream as a String using the specified character encoding. |
String | toString(byte[] input, String encoding) Get the contents of a byte[] as a String using the specified character encoding. |
void | write(byte[] data, OutputStream output) Writes bytes from a byte[] to an OutputStream . |
void | write(byte[] data, Writer output) Writes bytes from a byte[] to chars on a Writer using the default character encoding of the platform. |
void | write(char[] data, Writer output) Writes chars from a char[] to a Writer using the default character encoding of the platform. |
void | write(char[] data, OutputStream output) Writes chars from a char[] to bytes on an OutputStream . |
void | write(String data, Writer output) Writes chars from a String to a Writer . |
void | write(String data, OutputStream output) Writes chars from a String to bytes on an OutputStream using the default character encoding of the platform. |
void | write(StringBuffer data, Writer output) Writes chars from a StringBuffer to a Writer . |
void | write(StringBuffer data, OutputStream output) Writes chars from a StringBuffer to bytes on an OutputStream using the default character encoding of the platform. |
void | write(byte[] data, Writer output, String encoding) Writes bytes from a byte[] to chars on a Writer using the specified character encoding. |
void | write(char[] data, OutputStream output, String encoding) Writes chars from a char[] to bytes on an OutputStream using the specified character encoding. |
void | write(String data, OutputStream output, String encoding) Writes chars from a String to bytes on an OutputStream using the specified character encoding. |
void | write(StringBuffer data, OutputStream output, String encoding) Writes chars from a StringBuffer to bytes on an OutputStream using the specified character encoding. |
void | writeLines(Collection lines, String lineEnding, OutputStream output) Writes the toString() value of each item in a collection to an OutputStream line by line, using the default character encoding of the platform and the specified line ending. |
void | writeLines(Collection lines, String lineEnding, Writer writer) Writes the toString() value of each item in a collection to a Writer line by line, using the specified line ending. |
void | writeLines(Collection lines, String lineEnding, OutputStream output, String encoding) Writes the toString() value of each item in a collection to an OutputStream line by line, using the specified character encoding and the specified line ending. |