/libcore/luni/src/main/java/java/nio/channels/ |
H A D | ReadableByteChannel.java | 34 * Reads bytes from the channel into the given buffer. 38 * buffer when the method is invoked. The bytes will be read into the buffer 39 * starting at the buffer's current 45 * Upon completion, the buffer's {@code position} is updated to the end of 46 * the bytes that were read. The buffer's 49 * @param buffer 50 * the byte buffer to receive the bytes. 65 public int read(ByteBuffer buffer) throws IOException; argument
|
H A D | WritableByteChannel.java | 34 * Writes bytes from the given buffer to the channel. 37 * <code>remaining()</code> number of bytes in the buffer when the method 38 * invoked. The bytes will be written from the buffer starting at the 39 * buffer's <code>position</code>. 44 * Upon completion, the buffer's <code>position()</code> is updated to the 45 * end of the bytes that were written. The buffer's <code>limit()</code> 48 * @param buffer 49 * the byte buffer containing the bytes to be written. 63 public int write(ByteBuffer buffer) throws IOException; argument
|
/libcore/luni/src/main/java/java/io/ |
H A D | BufferedOutputStream.java | 25 * most (smaller) requests can be satisfied by accessing the buffer alone. The 26 * drawback is that some extra space is required to hold the buffer and that 27 * copying takes place when flushing that buffer, but this is usually outweighed 40 * The buffer containing the bytes to be written to the target stream. 50 * Constructs a new {@code BufferedOutputStream}, providing {@code out} with a buffer 53 * @param out the {@code OutputStream} the buffer writes to. 61 * of buffer. 63 * @param out the {@code OutputStream} the buffer writes to. 64 * @param size the size of buffer in bytes. 96 * Writes {@code count} bytes from the byte array {@code buffer} startin 121 write(byte[] buffer, int offset, int length) argument [all...] |
H A D | FilterInputStream.java | 117 @Override public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument 118 return in.read(buffer, byteOffset, byteCount);
|
H A D | FilterOutputStream.java | 92 * Writes {@code count} bytes from the byte array {@code buffer} starting at 95 * @param buffer 96 * the buffer to write. 98 * the index of the first byte in {@code buffer} to write. 100 * the number of bytes in {@code buffer} to write. 104 * {@code buffer}. 109 public void write(byte[] buffer, int offset, int length) throws IOException { argument 110 Arrays.checkOffsetAndCount(buffer.length, offset, length); 114 write(buffer[offset + i]);
|
H A D | FilterReader.java | 120 * in the byte array {@code buffer} starting at {@code offset}. Returns the 128 public int read(char[] buffer, int offset, int count) throws IOException { argument 130 return in.read(buffer, offset, count);
|
H A D | FilterWriter.java | 77 * Writes {@code count} characters from the char array {@code buffer} 80 * @param buffer 81 * the buffer to write. 83 * the index of the first character in {@code buffer} to write. 85 * the number of characters in {@code buffer} to write. 90 public void write(char[] buffer, int offset, int count) throws IOException { argument 92 out.write(buffer, offset, count);
|
H A D | InputStream.java | 159 * Equivalent to {@code read(buffer, 0, buffer.length)}. 161 public int read(byte[] buffer) throws IOException { argument 162 return read(buffer, 0, buffer.length); 167 * the byte array {@code buffer} starting at {@code byteOffset}. 172 * if {@code byteOffset < 0 || byteCount < 0 || byteOffset + byteCount > buffer.length}. 176 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument 177 Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount); 190 buffer[byteOffse [all...] |
H A D | ObjectInput.java | 58 * Reads bytes from this stream into the byte array {@code buffer}. Blocks 65 public int read(byte[] buffer) throws IOException; argument 69 * byte array {@code buffer} starting at offset {@code byteOffset}. Blocks while 76 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException; argument
|
H A D | ObjectOutput.java | 46 * Writes the entire contents of the byte array {@code buffer} to the output 49 * @param buffer 50 * the buffer to write. 54 public void write(byte[] buffer) throws IOException; argument 57 * Writes {@code count} bytes from the byte array {@code buffer} starting at 61 * @param buffer 62 * the buffer to write. 64 * the index of the first byte in {@code buffer} to write. 66 * the number of bytes from {@code buffer} to write to the target 71 public void write(byte[] buffer, in argument [all...] |
H A D | OutputStream.java | 79 * Equivalent to {@code write(buffer, 0, buffer.length)}. 81 public void write(byte[] buffer) throws IOException { argument 82 write(buffer, 0, buffer.length); 86 * Writes {@code count} bytes from the byte array {@code buffer} starting at 89 * @param buffer 90 * the buffer to be written. 92 * the start position in {@code buffer} from where to get bytes. 94 * the number of bytes from {@code buffer} t 103 write(byte[] buffer, int offset, int count) argument [all...] |
H A D | PipedOutputStream.java | 118 * Writes {@code count} bytes from the byte array {@code buffer} starting at 126 * @param buffer 127 * the buffer to write. 129 * the index of the first byte in {@code buffer} to write. 131 * the number of bytes from {@code buffer} to write to this 135 * offset + count} is bigger than the length of {@code buffer}. 146 public void write(byte[] buffer, int offset, int count) throws IOException { argument 147 super.write(buffer, offset, count);
|
H A D | PipedWriter.java | 124 * Writes {@code count} characters from the character array {@code buffer} 132 * @param buffer 133 * the buffer to write. 135 * the index of the first character in {@code buffer} to write. 137 * the number of characters from {@code buffer} to write to this 141 * offset + count} is bigger than the length of {@code buffer}. 152 * if {@code buffer} is {@code null}. 155 public void write(char[] buffer, int offset, int count) throws IOException { argument 160 reader.receive(buffer, offset, count);
|
H A D | SequenceInputStream.java | 150 * stores them in the byte array {@code buffer} starting at {@code byteOffset}. 166 * if {@code byteOffset < 0 || byteCount < 0 || byteOffset + byteCount > buffer.length}. 170 * if {@code buffer == null}. 173 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument 177 Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount); 179 int result = in.read(buffer, byteOffset, byteCount);
|
H A D | StringBufferInputStream.java | 33 protected String buffer; field in class:StringBufferInputStream 59 buffer = str; 78 return pos < count ? buffer.charAt(pos++) & 0xFF : -1; 81 @Override public synchronized int read(byte[] buffer, int byteOffset, int byteCount) { argument 82 if (buffer == null) { 83 throw new NullPointerException("buffer == null"); 85 Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount); 92 buffer[byteOffset + i] = (byte) this.buffer.charAt(pos + i);
|
H A D | BufferedWriter.java | 26 * requests can be satisfied by accessing the buffer alone. The drawback is that 27 * some extra space is required to hold the buffer and that copying takes place 28 * when filling that buffer, but this is usually outweighed by the performance 48 * Constructs a new {@code BufferedWriter}, providing {@code out} with a buffer 51 * @param out the {@code Writer} the buffer writes to. 59 * of buffer. 61 * @param out the {@code OutputStream} the buffer writes to. 62 * @param size the size of buffer in chars. 75 * Closes this writer. The contents of the buffer are flushed, the target 76 * writer is closed, and the buffer i 184 write(char[] buffer, int offset, int count) argument [all...] |
H A D | ByteArrayInputStream.java | 144 @Override public synchronized int read(byte[] buffer, int byteOffset, int byteCount) { argument 145 Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount); 156 System.arraycopy(this.buf, pos, buffer, byteOffset, copylen);
|
H A D | FileInputStream.java | 176 @Override public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument 177 return IoBridge.read(fd, buffer, byteOffset, byteCount);
|
H A D | FileOutputStream.java | 185 public void write(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument 186 IoBridge.write(fd, buffer, byteOffset, byteCount);
|
/libcore/luni/src/main/java/java/nio/ |
H A D | NioUtils.java | 33 public static void freeDirectBuffer(ByteBuffer buffer) { argument 34 if (buffer == null) { 37 ((DirectByteBuffer) buffer).free(); 56 * Normally, attempting to access the array backing a read-only buffer throws.
|
/libcore/luni/src/main/java/java/security/ |
H A D | DigestInputStream.java | 99 * Reads up to {@code byteCount} bytes into {@code buffer}, starting at 112 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument 113 int bytesRead = in.read(buffer, byteOffset, byteCount); 118 digest.update(buffer, byteOffset, bytesRead);
|
/libcore/luni/src/main/java/java/util/zip/ |
H A D | CheckedInputStream.java | 72 * into {@code buffer}, starting at offset {@code byteOffset}. The checksum is 81 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument 82 int bytesRead = in.read(buffer, byteOffset, byteCount); 84 check.update(buffer, byteOffset, bytesRead);
|
H A D | GZIPOutputStream.java | 68 * the given stream with the given internal buffer size. 76 * the given stream with the given internal buffer size and 105 * Write up to nbytes of data from the given buffer, starting at offset off, 109 public void write(byte[] buffer, int off, int nbytes) throws IOException { argument 110 super.write(buffer, off, nbytes); 111 crc.update(buffer, off, nbytes);
|
/libcore/benchmarks/src/benchmarks/regression/ |
H A D | SSLSocketBenchmark.java | 34 final byte[] buffer = new byte[BUFFER_SIZE]; field in class:SSLSocketBenchmark 87 int n = in.read(buffer);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
H A D | ScannerParseLargeFileBenchmarkTest.java | 53 public int read(char[] buffer, int offset, int length) { argument 63 buffer[bufferIndex++] = CONTENT[contentIndex++];
|