public class IoUtil
extends java.lang.Object
构造器和说明 |
---|
IoUtil() |
限定符和类型 | 方法和说明 |
---|---|
static <T extends java.io.OutputStream> |
transferTo(java.io.InputStream ins,
T out)
将输入流转换为输出流
|
static <T extends java.io.OutputStream> |
transferTo(java.io.InputStream ins,
T out,
long start,
long length)
将输入流转换为输出流
|
static byte[] |
transferToBytes(java.io.InputStream ins)
将输入流转换为byte数组
|
static java.lang.String |
transferToString(java.io.InputStream ins)
转移到字符串
|
static java.lang.String |
transferToString(java.io.InputStream ins,
java.lang.String charset)
将输入流转换为字符串
|
public static java.lang.String transferToString(java.io.InputStream ins) throws java.io.IOException
ins
- insString
java.io.IOException
- IOExceptionpublic static java.lang.String transferToString(java.io.InputStream ins, java.lang.String charset) throws java.io.IOException
ins
- 输入流charset
- 字符集String
java.io.IOException
- IOExceptionpublic static byte[] transferToBytes(java.io.InputStream ins) throws java.io.IOException
ins
- 输入流byte[]
java.io.IOException
- IOExceptionpublic static <T extends java.io.OutputStream> T transferTo(java.io.InputStream ins, T out) throws java.io.IOException
ins
- 输入流out
- 输出流T
java.io.IOException
- IOExceptionpublic static <T extends java.io.OutputStream> T transferTo(java.io.InputStream ins, T out, long start, long length) throws java.io.IOException
ins
- 输入流out
- 输出流start
- 开始位length
- 长度T
java.io.IOException
- IOException