| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| public static final LinkOption[] | EMPTY_LINK_OPTIONS
Empty array of type |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | closeQuietly(final Closeable
Closeable to close, can be null c)
Deprecated
Use
Closes the given Closeable and swallows any IOException that may occur.
org..
|
| public static void | copy(final File
The file to read. sourceFile, final OutputStream The output stream to write. outputStream)
Deprecated
Use
Copies the source file to the given output stream.
FileUtils#copyFile(File, OutputStream).
|
| public static long | Returns: the number of bytes copiedthe InputStream to copy input, final OutputStream the target, may be null to simulate output to dev/null on Linux and NUL on Windows output)
Deprecated
Use
Copies the content of a InputStream into an OutputStream.
org..
|
| public static long | Returns: the number of bytes copiedthe InputStream to copy input, final OutputStream the target, may be null to simulate output to dev/null on Linux and NUL on Windows output, final int the buffer size to use, must be bigger than 0 bufferSize)
Copies the content of a InputStream into an OutputStream
|
| public static long | Returns: the number of bytes copiedthe InputStream to copy input, final long maximum amount of bytes to copy len, final OutputStream the target Stream output)
Copies part of the content of a InputStream into an OutputStream.
|
| public static long | Returns: the number of bytes copiedthe InputStream to copy input, final long maximum amount of bytes to copy length, final OutputStream the target, may be null to simulate output to dev/null on Linux and NUL on Windows output, final int the buffer size to use, must be bigger than 0 bufferSize)
Deprecated
No longer used.
Copies part of the content of a InputStream into an OutputStream
|
| public static int | Returns: the number of bytes actually readfile to read file, final byte[] buffer to fill array)
Deprecated
Use
Reads as much from the file as possible to fill the given array.
Files#readAllBytes(java..
|
| public static int | Returns: the number of bytes actually readstream to read from input, final byte[] buffer to fill array)Reads as much from input as possible to fill the given array. |
| public static int | Returns: the number of bytes actually readstream to read from input, final byte[] buffer to fill array, final int offset into the buffer to start filling at offset, final int of bytes to read length)Reads as much from input as possible to fill the given array with the given amount of bytes. |
| public static void | readFully(final ReadableByteChannel
the channel to read from channel, final ByteBuffer the buffer into which the data is read. byteBuffer)Reads |
| public static byte[] | Returns: the requested byte arraythe input, final int InputStream to read frommaximum amount of bytes to copy length)Gets part of the contents of an |
| public static byte[] | Returns: the requested byte arraythe input, final int ReadableByteChannel to read frommaximum amount of bytes to copy length)Gets part of the contents of an |
| public static long | Returns: the number of bytes actually skippedstream to skip bytes in input, final long the number of bytes to skip numToSkip)
Deprecated
Use
Skips the given number of bytes by repeatedly invoking skip on the given input stream if necessary.
org..
|
| public static byte[] | Returns: the requested byte arraythe input)InputStream to read from
Deprecated
Use
Gets the contents of an org..
InputStream as a byte[].
|
| COPY_BUF_SIZE | back to summary |
|---|---|
| private static final int COPY_BUF_SIZE | |
| EMPTY_LINK_OPTIONS | back to summary |
|---|---|
| public static final LinkOption[] EMPTY_LINK_OPTIONS Empty array of type
| |
| IOUtils | back to summary |
|---|---|
| private IOUtils() Private constructor to prevent instantiation of this utility class. | |
| closeQuietly | back to summary |
|---|---|
| public static void closeQuietly(final Closeable c)
Deprecated Closes the given Closeable and swallows any IOException that may occur.
| |
| copy | back to summary |
|---|---|
| public static void copy(final File sourceFile, final OutputStream outputStream) throws IOException
Deprecated Copies the source file to the given output stream.
| |
| copy | back to summary |
|---|---|
| public static long copy(final InputStream input, final OutputStream output) throws IOException
Deprecated Use Copies the content of a InputStream into an OutputStream. Uses a default buffer size of 8024 bytes.
| |
| copy | back to summary |
|---|---|
| public static long copy(final InputStream input, final OutputStream output, final int bufferSize) throws IOException
Copies the content of a InputStream into an OutputStream
| |
| copyRange | back to summary |
|---|---|
| public static long copyRange(final InputStream input, final long len, final OutputStream output) throws IOException
Copies part of the content of a InputStream into an OutputStream. Uses a default buffer size of 8024 bytes.
| |
| copyRange | back to summary |
|---|---|
| public static long copyRange(final InputStream input, final long length, final OutputStream output, final int bufferSize) throws IOException
Deprecated No longer used. Copies part of the content of a InputStream into an OutputStream
| |
| read | back to summary |
|---|---|
| public static int read(final File file, final byte[] array) throws IOException
Deprecated Reads as much from the file as possible to fill the given array. This method may invoke read repeatedly to fill the array and only read less bytes than the length of the array if the end of the stream has been reached.
| |
| readFully | back to summary |
|---|---|
| public static int readFully(final InputStream input, final byte[] array) throws IOException Reads as much from input as possible to fill the given array. This method may invoke read repeatedly to fill the array and only read less bytes than the length of the array if the end of the stream has been reached.
| |
| readFully | back to summary |
|---|---|
| public static int readFully(final InputStream input, final byte[] array, final int offset, final int length) throws IOException Reads as much from input as possible to fill the given array with the given amount of bytes. This method may invoke read repeatedly to read the bytes and only read less bytes than the requested length if the end of the stream has been reached.
| |
| readFully | back to summary |
|---|---|
| public static void readFully(final ReadableByteChannel channel, final ByteBuffer byteBuffer) throws IOException Reads This method reads repeatedly from the channel until the requested number of bytes are read. This method blocks until the requested number of bytes are read, the end of the channel is detected, or an exception is thrown.
| |
| readRange | back to summary |
|---|---|
| public static byte[] readRange(final InputStream input, final int length) throws IOException Gets part of the contents of an
| |
| readRange | back to summary |
|---|---|
| public static byte[] readRange(final ReadableByteChannel input, final int length) throws IOException Gets part of the contents of an
| |
| skip | back to summary |
|---|---|
| public static long skip(final InputStream input, final long numToSkip) throws IOException
Deprecated Skips the given number of bytes by repeatedly invoking skip on the given input stream if necessary. In a case where the stream's skip() method returns 0 before the requested number of bytes has been skip this implementation will fall back to using the read() method. This method will only skip less than the requested number of bytes if the end of the input stream has been reached.
| |
| toByteArray | back to summary |
|---|---|
| public static byte[] toByteArray(final InputStream input) throws IOException
Deprecated Gets the contents of an
This method buffers the input internally, so there is no need to use a
| |