public class IO
extends java.lang.Object
Constructor and Description |
---|
IO() |
Modifier and Type | Method and Description |
---|---|
static void |
close(java.io.Closeable c)
Close given InputStream, ignoring any resulting exception.
|
static void |
close(java.io.InputStream inputStream)
Close given InputStream, ignoring any resulting exception.
|
static void |
close(java.io.OutputStream outputStream)
Close given OutputStream, ignoring any resulting exception.
|
static long |
copy(java.io.InputStream in,
java.io.OutputStream out) |
static long |
copy(java.io.InputStream in,
java.io.OutputStream out,
long maxBytes) |
static long |
copy(java.io.Reader in,
java.io.Writer out) |
static long |
copy(java.io.Reader in,
java.io.Writer out,
long maxChars) |
static byte[] |
readAll(java.io.InputStream in) |
static byte[] |
readAll(java.io.InputStream in,
int size) |
static java.lang.String |
readAll(java.io.Reader reader) |
static void |
skipFully(java.io.InputStream in,
long bytes)
Provide a skip fully method.
|
static boolean |
verifyURL(java.net.URL u) |
public static byte[] readAll(@WillClose java.io.InputStream in) throws java.io.IOException
java.io.IOException
public static byte[] readAll(@WillClose java.io.InputStream in, int size) throws java.io.IOException
java.io.IOException
public static java.lang.String readAll(java.io.Reader reader) throws java.io.IOException
java.io.IOException
public static long copy(@WillNotClose java.io.InputStream in, @WillNotClose java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public static long copy(java.io.Reader in, java.io.Writer out) throws java.io.IOException
java.io.IOException
public static long copy(@WillNotClose java.io.InputStream in, @WillNotClose java.io.OutputStream out, long maxBytes) throws java.io.IOException
java.io.IOException
public static long copy(java.io.Reader in, java.io.Writer out, long maxChars) throws java.io.IOException
java.io.IOException
public static void close(@CheckForNull java.io.Closeable c)
public static void close(@CheckForNull java.io.InputStream inputStream)
inputStream
- the InputStream to close; may be null (in which case nothing
happens)public static void close(@CheckForNull java.io.OutputStream outputStream)
outputStream
- the OutputStream to close; may be null (in which case nothing
happens)public static void skipFully(java.io.InputStream in, long bytes) throws java.io.IOException
in
- The input stream on which to perform the skipbytes
- Number of bytes to skipjava.io.EOFException
- if we reach EOF and still need to skip more bytesjava.io.IOException
- if in.skip throws an IOExceptionpublic static boolean verifyURL(java.net.URL u)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.