Package com.mchange.v1.io
Class InputStreamUtils
- java.lang.Object
-
- com.mchange.v1.io.InputStreamUtils
-
public final class InputStreamUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidattemptClose(java.io.InputStream is)static booleancompare(java.io.InputStream is1, java.io.InputStream is2)static booleancompare(java.io.InputStream is1, java.io.InputStream is2, long num_bytes)static byte[]getBytes(java.io.InputStream is)static byte[]getBytes(java.io.InputStream is, int max_len)static java.lang.StringgetContentsAsString(java.io.InputStream is)static java.lang.StringgetContentsAsString(java.io.InputStream is, int max_len)static java.lang.StringgetContentsAsString(java.io.InputStream is, int max_len, java.lang.String enc)static java.lang.StringgetContentsAsString(java.io.InputStream is, java.lang.String enc)static java.io.InputStreamgetEmptyInputStream()static voidskipFully(java.io.InputStream is, long num_bytes)
-
-
-
Method Detail
-
compare
public static boolean compare(java.io.InputStream is1, java.io.InputStream is2, long num_bytes) throws java.io.IOException- Throws:
java.io.IOException
-
compare
public static boolean compare(java.io.InputStream is1, java.io.InputStream is2) throws java.io.IOException- Throws:
java.io.IOException
-
getBytes
public static byte[] getBytes(java.io.InputStream is, int max_len) throws java.io.IOException- Throws:
java.io.IOException
-
getBytes
public static byte[] getBytes(java.io.InputStream is) throws java.io.IOException- Throws:
java.io.IOException
-
getContentsAsString
public static java.lang.String getContentsAsString(java.io.InputStream is, java.lang.String enc) throws java.io.IOException, java.io.UnsupportedEncodingException- Throws:
java.io.IOExceptionjava.io.UnsupportedEncodingException
-
getContentsAsString
public static java.lang.String getContentsAsString(java.io.InputStream is) throws java.io.IOException- Throws:
java.io.IOException
-
getContentsAsString
public static java.lang.String getContentsAsString(java.io.InputStream is, int max_len, java.lang.String enc) throws java.io.IOException, java.io.UnsupportedEncodingException- Throws:
java.io.IOExceptionjava.io.UnsupportedEncodingException
-
getContentsAsString
public static java.lang.String getContentsAsString(java.io.InputStream is, int max_len) throws java.io.IOException- Throws:
java.io.IOException
-
getEmptyInputStream
public static java.io.InputStream getEmptyInputStream()
-
attemptClose
public static void attemptClose(java.io.InputStream is)
-
skipFully
public static void skipFully(java.io.InputStream is, long num_bytes) throws java.io.EOFException, java.io.IOException- Throws:
java.io.EOFExceptionjava.io.IOException
-
-