Package com.mchange.v1.io
Class InputStreamUtils
java.lang.Object
com.mchange.v1.io.InputStreamUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidattemptClose(InputStream is, MLogger mlogger) static voidstatic booleancompare(InputStream is1, InputStream is2) static booleancompare(InputStream is1, InputStream is2, long num_bytes) static byte[]getBytes(InputStream is) static byte[]getBytes(InputStream is, int max_len) static Stringstatic StringgetContentsAsString(InputStream is, int max_len) static StringgetContentsAsString(InputStream is, int max_len, String enc) static StringgetContentsAsString(InputStream is, String enc) static InputStreamstatic voidskipFully(InputStream is, long num_bytes)
-
Method Details
-
compare
- Throws:
IOException
-
compare
- Throws:
IOException
-
getBytes
- Throws:
IOException
-
getBytes
- Throws:
IOException
-
getContentsAsString
public static String getContentsAsString(InputStream is, String enc) throws IOException, UnsupportedEncodingException -
getContentsAsString
- Throws:
IOException
-
getContentsAsString
public static String getContentsAsString(InputStream is, int max_len, String enc) throws IOException, UnsupportedEncodingException -
getContentsAsString
- Throws:
IOException
-
getEmptyInputStream
-
attemptClose
-
attemptClose
-
attemptCloseIgnore
-
skipFully
- Throws:
EOFExceptionIOException
-