类 IoUtil

java.lang.Object
top.yqingyu.common.utils.IoUtil

public class IoUtil extends Object
版本:
1.0.0
作者:
YYJ
  • 构造器详细资料

    • IoUtil

      public IoUtil()
  • 方法详细资料

    • readBytes

      public static byte[] readBytes(InputStream in, int len) throws cn.hutool.core.io.IORuntimeException
      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

      public static byte[] readBytes(SocketChannel socketChannel, int len) throws IOException
      description:读取SocketChannel中的数据直至读到一定长度的 byte
      抛出:
      IOException
    • deserializationObj

      public static <T> T deserializationObj(byte[] bytes2, Class<T> tClass) throws IOException, ClassNotFoundException
      抛出:
      IOException
      ClassNotFoundException
    • objToSerializBytes

      public static byte[] objToSerializBytes(Serializable obj) throws IOException
      抛出:
      IOException
    • transSocket

      public static void transSocket(Socket socket1, Socket socket2, ThreadPoolExecutor pool, int bufferSize) throws IOException
      socket 转发
      参数:
      socket1 -
      socket2 -
      pool -
      抛出:
      IOException