Home | History | Annotate | Download | only in iso

Lines Matching refs:channel

30     public static ByteBuffer readFully(final ReadableByteChannel channel, long size) throws IOException {
32 if (channel instanceof FileChannel && size > 1024 * 1024) {
33 ByteBuffer bb = ((FileChannel) channel).map(FileChannel.MapMode.READ_ONLY, ((FileChannel) channel).position(), size);
34 ((FileChannel) channel).position(((FileChannel) channel).position() + size);
38 readFully(channel, buf, buf.limit());
48 public static void readFully(final ReadableByteChannel channel, final ByteBuffer buf)
50 readFully(channel, buf, buf.remaining());
53 public static int readFully(final ReadableByteChannel channel, final ByteBuffer buf, final int length)
56 while (-1 != (n = channel.read(buf))) {
69 public static void writeFully(final WritableByteChannel channel, final ByteBuffer buf)
72 int written = channel.write(buf);
82 key.channel().close();