Searched refs:buffers (Results 1 - 14 of 14) 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
385 * of buffers. This method attempts to read as many bytes as can be stored
394 * {@code read(buffers, 0, buffers.length);}
396 * @param buffers
397 * the array of byte buffers into which the bytes will be copied.
414 public final long read(ByteBuffer[] buffers) throws IOException { argument
415 return read(buffers, 0, buffers.length);
419 * Reads bytes from this file channel into a subset of the given buffers
453 read(ByteBuffer[] buffers, int start, int number) argument
713 write(ByteBuffer[] buffers) argument
754 write(ByteBuffer[] buffers, int offset, int length) argument
[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.java347 public long read(ByteBuffer[] buffers, int offset, int length) throws IOException { argument
348 Arrays.checkOffsetAndCount(buffers.length, offset, length);
351 return transferIoVec(new IoVec(buffers, offset, length, IoVec.Direction.READV));
512 public long write(ByteBuffer[] buffers, int offset, int length) throws IOException { argument
513 Arrays.checkOffsetAndCount(buffers.length, offset, length);
516 return transferIoVec(new IoVec(buffers, offset, length, IoVec.Direction.WRITEV));
520 * @param copyingIn true if we're copying data into the buffers (typically
522 * copying data out of the buffers (for a file/network write operation).
524 static int calculateTotalRemaining(ByteBuffer[] buffers, int offset, int length, boolean copyingIn) { argument
527 count += buffers[
[all...]
/libcore/luni/src/test/java/libcore/java/nio/channels/
H A DFileChannelTest.java72 // Check that both direct and non-direct buffers work.
74 ByteBuffer[] buffers = new ByteBuffer[] { ByteBuffer.allocateDirect(4), ByteBuffer.allocate(4) };
75 assertEquals(8, fc.read(buffers));
77 assertEquals(8, buffers[0].limit() + buffers[1].limit());
79 buffers[0].flip();
80 buffers[0].get(bytes);
82 buffers[1].flip();
83 buffers[1].get(bytes);
90 // Check that both direct and non-direct buffers wor
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
H A DSocketChannelTest.java2914 // Test overlapping buffers
2916 ByteBuffer[] buffers = new ByteBuffer[3];
2917 buffers[0] = ByteBuffer.wrap(data, 0, 6);
2918 buffers[1] = ByteBuffer.wrap(data, 6, data.length - 6);
2919 buffers[2] = ByteBuffer.wrap(data);
2922 client.write(buffers);
2948 ByteBuffer[] buffers = new ByteBuffer[3];
2949 buffers[0] = ByteBuffer.wrap(data, 0, 2);
2950 assertFalse(buffers[0].isDirect());
2951 assertTrue(buffers[
[all...]
H A DFileChannelTest.java1321 ByteBuffer[] buffers = new ByteBuffer[2];
1322 mockChannel.read(buffers);
/libcore/luni/src/main/java/libcore/io/
H A DBlockGuardOs.java238 @Override public int readv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException, InterruptedIOException { argument
240 return os.readv(fd, buffers, offsets, byteCounts);
316 @Override public int writev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException, InterruptedIOException { argument
318 return os.writev(fd, buffers, offsets, byteCounts);
H A DForwardingOs.java127 public int readv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException, InterruptedIOException { return os.readv(fd, buffers, offsets, byteCounts); } argument
166 public int writev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException, InterruptedIOException { return os.writev(fd, buffers, offsets, byteCounts); } argument
H A DOs.java120 public int readv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException, InterruptedIOException; argument
159 public int writev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException, InterruptedIOException; argument
H A DPosix.java169 public native int readv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException, InterruptedIOException; argument
261 public native int writev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException, InterruptedIOException; argument
/libcore/luni/src/main/java/android/system/
H A DOs.java360 public static int readv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException, InterruptedIOException { return Libcore.os.readv(fd, buffers, offsets, byteCounts); } argument
524 public static int writev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException, InterruptedIOException { return Libcore.os.writev(fd, buffers, offsets, byteCounts); } argument
/libcore/luni/src/main/native/
H A Dlibcore_io_Posix.cpp1172 static jint Posix_readv(JNIEnv* env, jobject, jobject javaFd, jobjectArray buffers, jintArray offsets, jintArray byteCounts) { argument
1173 IoVec<ScopedBytesRW> ioVec(env, env->GetArrayLength(buffers));
1174 if (!ioVec.init(buffers, offsets, byteCounts)) {
1526 static jint Posix_writev(JNIEnv* env, jobject, jobject javaFd, jobjectArray buffers, jintArray offsets, jintArray byteCounts) { argument
1527 IoVec<ScopedBytesRO> ioVec(env, env->GetArrayLength(buffers));
1528 if (!ioVec.init(buffers, offsets, byteCounts)) {

Completed in 550 milliseconds