Package com.weicoder.common.io
Class AsynChannelUtil
- java.lang.Object
-
- com.weicoder.common.io.AsynChannelUtil
-
- Direct Known Subclasses:
U.AC
public class AsynChannelUtil extends java.lang.Objectaio读写字节流- Author:
- wudi
-
-
Constructor Summary
Constructors Constructor Description AsynChannelUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]read(java.nio.channels.AsynchronousByteChannel asc)读取出通道的所有字节static byte[]read(java.nio.channels.AsynchronousByteChannel asc, boolean isClose)读取出通道的所有字节static intwrite(java.nio.channels.AsynchronousByteChannel asc, byte[] b)把字节流写入到aio中static intwrite(java.nio.channels.AsynchronousByteChannel asc, byte[] b, boolean isClose)把字节流写入到aio中
-
-
-
Method Detail
-
read
public static byte[] read(java.nio.channels.AsynchronousByteChannel asc)
读取出通道的所有字节- Parameters:
asc- 通道- Returns:
- 字节数组
-
read
public static byte[] read(java.nio.channels.AsynchronousByteChannel asc, boolean isClose)读取出通道的所有字节- Parameters:
asc- 通道isClose- 是否关闭流- Returns:
- 字节数组
-
write
public static int write(java.nio.channels.AsynchronousByteChannel asc, byte[] b)把字节流写入到aio中- Parameters:
asc- 写入通道b- 字节数组- Returns:
- true false
-
write
public static int write(java.nio.channels.AsynchronousByteChannel asc, byte[] b, boolean isClose)把字节流写入到aio中- Parameters:
asc- 写入通道b- 字节数组isClose- 是否关闭流- Returns:
- true false
-
-