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