Package com.appslandia.common.utils
Class IOUtils
- java.lang.Object
-
- com.appslandia.common.utils.IOUtils
-
-
Constructor Summary
Constructors Constructor Description IOUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcloseQuietly(Closeable closeable)static voidcopy(byte[] src, int copyLength, OutputStream os)static intcopy(InputStream is, OutputStream os)static intcopy(Reader r, Writer w)static InputStreamnonClosing(InputStream in)static OutputStreamnonClosing(OutputStream out)static ReadernonClosing(Reader r)static WriternonClosing(Writer w)static byte[]toByteArray(InputStream is)static StringtoString(InputStream is, String charsetName)static StringtoString(Reader r)
-
-
-
Method Detail
-
copy
public static int copy(InputStream is, OutputStream os) throws IOException
- Throws:
IOException
-
copy
public static void copy(byte[] src, int copyLength, OutputStream os) throws IOException- Throws:
IOException
-
copy
public static int copy(Reader r, Writer w) throws IOException
- Throws:
IOException
-
toByteArray
public static byte[] toByteArray(InputStream is) throws IOException
- Throws:
IOException
-
toString
public static String toString(Reader r) throws IOException
- Throws:
IOException
-
toString
public static String toString(InputStream is, String charsetName) throws IOException
- Throws:
IOException
-
closeQuietly
public static void closeQuietly(Closeable closeable)
-
nonClosing
public static InputStream nonClosing(InputStream in)
-
nonClosing
public static OutputStream nonClosing(OutputStream out)
-
-