edu.umd.cs.findbugs.io
Class IO
java.lang.Object
edu.umd.cs.findbugs.io.IO
public class IO
- extends java.lang.Object
Method Summary |
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 java.lang.String |
readAll(java.io.InputStream in)
|
static java.lang.String |
readAll(java.io.Reader reader)
|
static void |
skipFully(java.io.InputStream in,
long bytes)
Provide a skip fully method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IO
public IO()
readAll
public static java.lang.String readAll(java.io.InputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
readAll
public static java.lang.String readAll(java.io.Reader reader)
throws java.io.IOException
- Throws:
java.io.IOException
copy
public static long copy(@WillNotClose
java.io.InputStream in,
@WillNotClose
java.io.OutputStream out)
throws java.io.IOException
- Throws:
java.io.IOException
copy
public static long copy(java.io.Reader in,
java.io.Writer out)
throws java.io.IOException
- Throws:
java.io.IOException
copy
public static long copy(@WillNotClose
java.io.InputStream in,
@WillNotClose
java.io.OutputStream out,
long maxBytes)
throws java.io.IOException
- Throws:
java.io.IOException
copy
public static long copy(java.io.Reader in,
java.io.Writer out,
long maxChars)
throws java.io.IOException
- Throws:
java.io.IOException
close
public static void close(java.io.InputStream inputStream)
- Close given InputStream, ignoring any resulting exception.
- Parameters:
inputStream
- the InputStream to close;
may be null (in which case nothing happens)
close
public static void close(java.io.OutputStream outputStream)
- Close given OutputStream, ignoring any resulting exception.
- Parameters:
outputStream
- the OutputStream to close;
may be null (in which case nothing happens)
skipFully
public static void skipFully(java.io.InputStream in,
long bytes)
throws java.io.IOException
- Provide a skip fully method. Either skips the requested number of bytes or throws an IOException;
- Parameters:
in
- The input stream on which to perform the skipbytes
- Number of bytes to skip
- Throws:
java.io.EOFException
- if we reach EOF and still need to skip more bytes
java.io.IOException
- if in.skip throws an IOException
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.