public class IoUtil extends Object
| 构造器和说明 |
|---|
IoUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
close(Closeable closeable)
关闭流
|
static long |
copy(InputStream in,
OutputStream out)
复制流
|
static long |
copy(InputStream in,
OutputStream out,
int bufferSize)
复制流
|
static ByteArrayOutputStream |
read(InputStream in,
boolean isClose)
读取outputStream
|
static byte[] |
readBytes(InputStream in)
读取byte数组
|
static byte[] |
readBytes(InputStream in,
boolean isClose)
读取byte数组
|
static byte[] |
readSocket(InputStream inputStream)
读取socket数据方法
|
static byte[] |
readSocket(InputStream inputStream,
Integer length)
读取socket定长数据方法
|
public static long copy(InputStream in, OutputStream out) throws IOException
in - out - IOExceptionpublic static long copy(InputStream in, OutputStream out, int bufferSize) throws IOException
in - out - bufferSize - IOExceptionpublic static byte[] readBytes(InputStream in) throws IOException
in - IOExceptionpublic static byte[] readBytes(InputStream in, boolean isClose) throws IOException
in - isClose - IOExceptionpublic static ByteArrayOutputStream read(InputStream in, boolean isClose) throws IOException
in - isClose - IOExceptionpublic static byte[] readSocket(InputStream inputStream)
inputStream - public static byte[] readSocket(InputStream inputStream, Integer length)
inputStream - public static void close(Closeable closeable)
closeable - Copyright © 2021. All rights reserved.