public class IOUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
IOUtil.ReadException |
static class |
IOUtil.WrappedException |
static class |
IOUtil.WriteException |
Modifier and Type | Field and Description |
---|---|
static OutputStream |
BlackHoleOutputStream |
static int |
DefaultCopyBufferSize |
static InputStream |
EmptyInputStream |
Constructor and Description |
---|
IOUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
closeInput(InputStream in)
Closes the given input stream and ignores the IOException.
|
static void |
closeInput(Reader in)
Closes the given Reader and ignores the IOException.
|
void |
copyFileToStream(File fin,
OutputStream out) |
void |
copyFileToStream(File fin,
OutputStream out,
int copyBufferSize) |
void |
copyStreamToFile(InputStream in,
File fout) |
void |
copyStreamToFile(InputStream in,
File fout,
int copyBufferSize) |
static void |
copyStreamToStream(InputStream in,
OutputStream out) |
static void |
copyStreamToStream(InputStream in,
OutputStream out,
byte[] copyBuffer) |
static void |
copyStreamToStream(InputStream in,
OutputStream out,
int copyBufferSize) |
static byte[] |
slurp(InputStream in,
int byteLimit) |
static byte[] |
slurp(InputStream in,
int byteLimit,
byte[] slurpBuffer) |
public static final int DefaultCopyBufferSize
public static final InputStream EmptyInputStream
public static final OutputStream BlackHoleOutputStream
public static void copyStreamToStream(InputStream in, OutputStream out) throws IOUtil.ReadException, IOUtil.WriteException
public static void copyStreamToStream(InputStream in, OutputStream out, byte[] copyBuffer) throws IOUtil.ReadException, IOUtil.WriteException
public static void copyStreamToStream(InputStream in, OutputStream out, int copyBufferSize) throws IOUtil.ReadException, IOUtil.WriteException
public static byte[] slurp(InputStream in, int byteLimit) throws IOException
IOException
public static byte[] slurp(InputStream in, int byteLimit, byte[] slurpBuffer) throws IOException
IOException
public void copyFileToStream(File fin, OutputStream out) throws IOUtil.ReadException, IOUtil.WriteException
public void copyFileToStream(File fin, OutputStream out, int copyBufferSize) throws IOUtil.ReadException, IOUtil.WriteException
public void copyStreamToFile(InputStream in, File fout) throws IOUtil.ReadException, IOUtil.WriteException
public void copyStreamToFile(InputStream in, File fout, int copyBufferSize) throws IOUtil.ReadException, IOUtil.WriteException
public static void closeInput(InputStream in)
public static void closeInput(Reader in)
Copyright © 2014. All rights reserved.