类 IoUtil
java.lang.Object
top.yqingyu.common.utils.IoUtil
- 版本:
- 1.0.0
- 作者:
- YYJ
-
嵌套类概要
嵌套类修饰符和类型类说明static class从OutputStream 读取数据static class -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static <T> TdeserializationObj(byte[] bytes2, Class<T> tClass) static byte[]static byte[]readBytes(InputStream in, int len) description: 读取InputStream中的数据读到一定长度的 bytestatic byte[]readBytes(InputStream in, int len, int timeout) description: 读取InputStream中的数据直至读到一定长度的 bytestatic byte[]readBytes(SocketChannel socketChannel, int len) description:读取SocketChannel中的数据直至读到一定长度的 bytestatic voidtransSocket(Socket socket1, Socket socket2, ThreadPoolExecutor pool, int bufferSize) socket 转发
-
构造器详细资料
-
IoUtil
public IoUtil()
-
-
方法详细资料
-
readBytes
description: 读取InputStream中的数据读到一定长度的 byte- 抛出:
cn.hutool.core.io.IORuntimeException
-
readBytes
public static byte[] readBytes(InputStream in, int len, int timeout) throws cn.hutool.core.io.IORuntimeException description: 读取InputStream中的数据直至读到一定长度的 byte- 抛出:
cn.hutool.core.io.IORuntimeException
-
readBytes
description:读取SocketChannel中的数据直至读到一定长度的 byte- 抛出:
IOException
-
deserializationObj
public static <T> T deserializationObj(byte[] bytes2, Class<T> tClass) throws IOException, ClassNotFoundException -
objToSerializBytes
- 抛出:
IOException
-
transSocket
public static void transSocket(Socket socket1, Socket socket2, ThreadPoolExecutor pool, int bufferSize) throws IOException socket 转发- 参数:
socket1-socket2-pool-- 抛出:
IOException
-