Package VASSAL.tools.io
Class IOUtils
java.lang.Object
org.apache.commons.io.IOUtils
VASSAL.tools.io.IOUtils
public class IOUtils
extends org.apache.commons.io.IOUtils
General I/O stream manipulation utilities. This class provides static
utility methods to reduce boilerplate I/O code.
- Since:
- 3.1.0
- Author:
- Joel Uckelman
-
Field Summary
Fields inherited from class org.apache.commons.io.IOUtils
DEFAULT_BUFFER_SIZE, DIR_SEPARATOR, DIR_SEPARATOR_UNIX, DIR_SEPARATOR_WINDOWS, EOF, LINE_SEPARATOR, LINE_SEPARATOR_UNIX, LINE_SEPARATOR_WINDOWS -
Constructor Summary
Constructors Modifier Constructor Description protectedIOUtils() -
Method Summary
Modifier and Type Method Description static voidcloseQuietly(AutoCloseable c)Deprecated.use try with resources or close and catch manuallystatic intcopy(FileInputStream in, FileOutputStream out)Copies bytes from aFileInputStreamto aFileOutputStream.static intcopy(InputStream in, OutputStream out, byte[] buffer)Copies bytes from anInputStreamto anOutputStreamvia abytebuffer.static longcopyLarge(FileInputStream in, FileOutputStream out)Copies bytes from a large (over 2GB)FileInputStreamto aFileOutputStream.Methods inherited from class org.apache.commons.io.IOUtils
buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, close, close, close, closeQuietly, closeQuietly, closeQuietly, closeQuietly, closeQuietly, closeQuietly, closeQuietly, closeQuietly, closeQuietly, closeQuietly, contentEquals, contentEquals, contentEqualsIgnoreEOL, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copyLarge, copyLarge, copyLarge, copyLarge, copyLarge, copyLarge, copyLarge, copyLarge, length, length, length, length, lineIterator, lineIterator, lineIterator, read, read, read, read, read, readFully, readFully, readFully, readFully, readFully, readFully, readLines, readLines, readLines, readLines, resourceToByteArray, resourceToByteArray, resourceToString, resourceToString, resourceToURL, resourceToURL, skip, skip, skip, skipFully, skipFully, skipFully, toBufferedInputStream, toBufferedInputStream, toBufferedReader, toBufferedReader, toByteArray, toByteArray, toByteArray, toByteArray, toByteArray, toByteArray, toByteArray, toByteArray, toByteArray, toByteArray, toCharArray, toCharArray, toCharArray, toCharArray, toInputStream, toInputStream, toInputStream, toInputStream, toInputStream, toInputStream, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, toString, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, write, writeChunked, writeChunked, writeLines, writeLines, writeLines, writeLines, writer
-
Constructor Details
-
IOUtils
protected IOUtils()
-
-
Method Details
-
copy
Copies bytes from aFileInputStreamto aFileOutputStream. This method uses channels. The input file should not be written to during the copy.- Parameters:
in- the sourceout- the destination- Throws:
IOException- if one occurs while reading or writing
-
copyLarge
Copies bytes from a large (over 2GB)FileInputStreamto aFileOutputStream. This method uses channels. The input file should not be written to during the copy.- Parameters:
in- the sourceout- the destination- Throws:
IOException- if one occurs while reading or writing
-
copy
Copies bytes from anInputStreamto anOutputStreamvia abytebuffer. This method buffers input internally, so the input stream should not be aBufferedInputStream.- Parameters:
in- the sourceout- the destinationbuffer- the buffer- Returns:
- the number of bytes copied
- Throws:
IOException- if one occurs while reading or writing
-
closeQuietly
Deprecated.use try with resources or close and catch manually- Parameters:
c- a (possiblynull)AutoCloseable
-