Class IoUtil
- java.lang.Object
-
- org.zeroturnaround.javarebel.integration.util.IoUtil
-
public class IoUtil extends Object
Helper methods for managing streams
-
-
Constructor Summary
Constructors Constructor Description IoUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcloseStream(InputStream in)static voidcopy(InputStream in, OutputStream out)static voidcopy(Reader in, Writer out)static byte[]getBytes(InputStream in)static byte[]getBytesAndClose(InputStream in)static byte[]getBytesAndClose(Reader in)static InputStreamgetInputStream(File file)static URLgetURL(File file)static voidwrite(byte[] bytes, OutputStream out)
-
-
-
Method Detail
-
write
public static void write(byte[] bytes, OutputStream out) throws IOException- Throws:
IOException
-
copy
public static void copy(InputStream in, OutputStream out) throws IOException
- Throws:
IOException
-
copy
public static void copy(Reader in, Writer out) throws IOException
- Throws:
IOException
-
getBytes
public static byte[] getBytes(InputStream in) throws IOException
- Throws:
IOException
-
getBytesAndClose
public static byte[] getBytesAndClose(Reader in) throws IOException
- Throws:
IOException
-
getBytesAndClose
public static byte[] getBytesAndClose(InputStream in)
-
closeStream
public static void closeStream(InputStream in)
-
getInputStream
public static InputStream getInputStream(File file)
-
-