public class InputStreamUtils extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected org.slf4j.Logger |
log |
| 构造器和说明 |
|---|
InputStreamUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
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 |
getContentsAsString(InputStream is) |
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 void |
skipFully(InputStream is,
long num_bytes) |
public static boolean compare(InputStream is1, InputStream is2, long num_bytes) throws IOException
IOExceptionpublic static boolean compare(InputStream is1, InputStream is2) throws IOException
IOExceptionpublic static byte[] getBytes(InputStream is, int max_len) throws IOException
IOExceptionpublic static byte[] getBytes(InputStream is) throws IOException
IOExceptionpublic static String getContentsAsString(InputStream is, String enc) throws IOException, UnsupportedEncodingException
public static String getContentsAsString(InputStream is) throws IOException
IOExceptionpublic static String getContentsAsString(InputStream is, int max_len, String enc) throws IOException, UnsupportedEncodingException
public static String getContentsAsString(InputStream is, int max_len) throws IOException
IOExceptionpublic static void skipFully(InputStream is, long num_bytes) throws EOFException, IOException
Copyright © 2020. All rights reserved.