Package com.mchange.v1.io
Class InputStreamUtils
java.lang.Object
com.mchange.v1.io.InputStreamUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
attemptClose
(InputStream is, MLogger mlogger) static void
static boolean
compare
(InputStream is1, InputStream is2) static boolean
compare
(InputStream is1, InputStream is2, long num_bytes) static byte[]
getBytes
(InputStream is) static byte[]
getBytes
(InputStream is, int max_len) static String
static String
getContentsAsString
(InputStream is, int max_len) static String
getContentsAsString
(InputStream is, int max_len, String enc) static String
getContentsAsString
(InputStream is, String enc) static InputStream
static void
skipFully
(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:
EOFException
IOException
-