Searched refs:buffers (Results 1 - 11 of 11) sorted by relevance

/libcore/luni/src/main/java/java/nio/channels/
H A DGatheringByteChannel.java23 * The interface for channels that can write a set of buffers in a single
30 * Writes bytes from all the given buffers to a channel.
32 * This method is equivalent to: {@code write(buffers, 0, buffers.length);}
34 * @param buffers
35 * the buffers containing bytes to be written.
49 * {@code buffers}.
56 public long write(ByteBuffer[] buffers) throws IOException; argument
60 * byte buffers, in order, starting at {@code buffers[offse
93 write(ByteBuffer[] buffers, int offset, int length) argument
[all...]
H A DScatteringByteChannel.java23 * The interface for channels that can read data into a set of buffers in a
30 * Reads bytes from this channel into the specified array of buffers.
32 * This method is equivalent to {@code read(buffers, 0, buffers.length);}
34 * @param buffers
35 * the array of byte buffers to store the bytes being read.
52 public long read(ByteBuffer[] buffers) throws IOException; argument
56 * buffers, in order, starting at {@code buffers[offset]}. The number of
62 * @param buffers
88 read(ByteBuffer[] buffers, int offset, int length) argument
[all...]
H A DFileChannel.java58 * <li>memory-mapping files into NIO buffers to provide efficient manipulation
388 * of buffers. This method attempts to read as many bytes as can be stored
397 * {@code read(buffers, 0, buffers.length);}
399 * @param buffers
400 * the array of byte buffers into which the bytes will be copied.
416 public final long read(ByteBuffer[] buffers) throws IOException { argument
417 return read(buffers, 0, buffers.length);
421 * Reads bytes from this file channel into a subset of the given buffers
455 read(ByteBuffer[] buffers, int start, int number) argument
715 write(ByteBuffer[] buffers) argument
755 write(ByteBuffer[] buffers, int offset, int length) argument
[all...]
/libcore/luni/src/test/java/libcore/java/nio/channels/
H A DFileChannelTest.java70 // Check that both direct and non-direct buffers work.
72 ByteBuffer[] buffers = new ByteBuffer[] { ByteBuffer.allocateDirect(4), ByteBuffer.allocate(4) };
73 assertEquals(8, fc.read(buffers));
75 assertEquals(8, buffers[0].limit() + buffers[1].limit());
77 buffers[0].flip();
78 buffers[0].get(bytes);
80 buffers[1].flip();
81 buffers[1].get(bytes);
88 // Check that both direct and non-direct buffers wor
[all...]
/libcore/luni/src/main/java/java/nio/
H A DPipeImpl.java82 public long read(ByteBuffer[] buffers) throws IOException { argument
83 return channel.read(buffers);
86 public long read(ByteBuffer[] buffers, int offset, int length) throws IOException { argument
87 return channel.read(buffers, offset, length);
117 public long write(ByteBuffer[] buffers) throws IOException { argument
118 return channel.write(buffers);
121 public long write(ByteBuffer[] buffers, int offset, int length) throws IOException { argument
122 return channel.write(buffers, offset, length);
H A DFileChannelImpl.java336 public long read(ByteBuffer[] buffers, int offset, int length) throws IOException { argument
337 Arrays.checkOffsetAndCount(buffers.length, offset, length);
340 return transferIoVec(new IoVec(buffers, offset, length, IoVec.Direction.READV));
501 public long write(ByteBuffer[] buffers, int offset, int length) throws IOException { argument
502 Arrays.checkOffsetAndCount(buffers.length, offset, length);
505 return transferIoVec(new IoVec(buffers, offset, length, IoVec.Direction.WRITEV));
509 * @param copyingIn true if we're copying data into the buffers (typically
511 * copying data out of the buffers (for a file/network write operation).
513 static int calculateTotalRemaining(ByteBuffer[] buffers, int offset, int length, boolean copyingIn) { argument
516 count += buffers[
[all...]
/libcore/luni/src/main/java/libcore/io/
H A DBlockGuardOs.java152 @Override public int readv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException { argument
154 return os.readv(fd, buffers, offsets, byteCounts);
200 @Override public int writev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException { argument
202 return os.writev(fd, buffers, offsets, byteCounts);
H A DForwardingOs.java102 public int readv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException { return os.readv(fd, buffers, offsets, byteCounts); } argument
136 public int writev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException { return os.writev(fd, buffers, offsets, byteCounts); } argument
H A DOs.java95 public int readv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException; argument
130 public int writev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException; argument
H A DPosix.java126 public native int readv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException; argument
190 public native int writev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException; argument
/libcore/luni/src/main/native/
H A Dlibcore_io_Posix.cpp986 static jint Posix_readv(JNIEnv* env, jobject, jobject javaFd, jobjectArray buffers, jintArray offsets, jintArray byteCounts) { argument
987 IoVec<ScopedBytesRW> ioVec(env, env->GetArrayLength(buffers));
988 if (!ioVec.init(buffers, offsets, byteCounts)) {
1262 static jint Posix_writev(JNIEnv* env, jobject, jobject javaFd, jobjectArray buffers, jintArray offsets, jintArray byteCounts) { argument
1263 IoVec<ScopedBytesRO> ioVec(env, env->GetArrayLength(buffers));
1264 if (!ioVec.init(buffers, offsets, byteCounts)) {

Completed in 457 milliseconds