Reusable Java library of general tools with minimal external dependencies.
For questions or support, please contact us:
Email: support@aoindustries.com
Phone: 1-800-519-9541
Phone: +1-251-607-9556
Web: https://www.aoindustries.com/contact
public final class IoUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
contentEquals(InputStream in,
byte[] contents)
Compares the contents retrieved from an InputStream to the provided contents.
|
static long |
copy(InputStream in,
OutputStream out)
copies without flush.
|
static long |
copy(InputStream in,
OutputStream out,
boolean flush)
Copies all information from one stream to another.
|
static long |
copy(Reader in,
Appendable out)
Copies all information from one stream to an appendable.
|
static long |
copy(Reader in,
StringBuilder out)
Copies all information from one stream to another.
|
static long |
copy(Reader in,
Writer out)
Copies all information from one stream to another.
|
static byte[] |
readFully(InputStream in)
Reads an input stream fully (to end of stream), returning a byte[] of the content read.
|
static void |
readFully(InputStream in,
byte[] buffer)
readFully for any stream.
|
static void |
readFully(InputStream in,
byte[] buffer,
int off,
int len)
readFully for any stream.
|
static String |
readFully(Reader in)
Reads a reader fully (to end of stream), returning a String of the content read.
|
public static long copy(InputStream in, OutputStream out) throws IOException
IOExceptioncopy(java.io.InputStream, java.io.OutputStream, boolean)public static long copy(InputStream in, OutputStream out, boolean flush) throws IOException
IOExceptionBufferManager.getBytes()public static long copy(Reader in, Writer out) throws IOException
IOExceptionBufferManager.getChars()public static long copy(Reader in, Appendable out) throws IOException
IOExceptionBufferManager.getChars()public static long copy(Reader in, StringBuilder out) throws IOException
IOExceptionBufferManager.getChars()public static void readFully(InputStream in, byte[] buffer) throws IOException
IOExceptionpublic static void readFully(InputStream in, byte[] buffer, int off, int len) throws IOException
IOExceptionpublic static byte[] readFully(InputStream in) throws IOException
IOExceptionpublic static String readFully(Reader in) throws IOException
IOExceptionpublic static boolean contentEquals(InputStream in, byte[] contents) throws IOException
IOExceptionCopyright © 2000–2016 AO Industries, Inc.. All rights reserved.