Class NIO


  • public final class NIO
    extends BaseIO
    非堵塞IO操作
    Author:
    WD
    • Constructor Summary

      Constructors 
      Constructor Description
      NIO()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] read​(java.io.InputStream in, boolean isClose)
      读取出输入流的所有字节
      boolean write​(java.io.OutputStream out, java.io.InputStream in, boolean isClose)
      把text写入到os中
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NIO

        public NIO()
    • Method Detail

      • read

        public byte[] read​(java.io.InputStream in,
                           boolean isClose)
        读取出输入流的所有字节
        Parameters:
        in - 输入流
        isClose - 是否关闭流
        Returns:
        字节数组
      • write

        public boolean write​(java.io.OutputStream out,
                             java.io.InputStream in,
                             boolean isClose)
        把text写入到os中
        Parameters:
        out - 输出流
        in - 输入流
        isClose - 是否关闭流
        Returns:
        true false