/libcore/luni/src/test/etc/loading-test-jar/ |
H A D | TestMethods.java | 68 byte[] buffer = new byte[1024]; 71 int byteCount = in.read(buffer); 75 bytes.write(buffer, 0, byteCount);
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
H A D | ZipInputStreamTest.java | 60 byte[] buffer = new byte[1024]; 62 while ((count = in.read(buffer)) != -1) { 63 out.write(buffer, 0, count);
|
/libcore/tzdata/update/src/main/libcore/tzdata/update/ |
H A D | ConfigBundle.java | 69 byte[] buffer = new byte[BUFFER_SIZE]; 90 while ((count = zipInputStream.read(buffer)) != -1) { 91 fos.write(buffer, 0, count);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
H A D | WriterTest.java | 121 public void write(char[] buffer, int offset, int count) argument 126 if (offset < 0 || count < 0 || offset >= buffer.length) { 129 count = Math.min(count, buffer.length - offset); 132 contents[this.offset + i] = buffer[offset + i];
|
H A D | BufferedOutputStreamTest.java | 141 assertTrue("Bytes not written when buffer full", 672 byte[] buffer = "1234567890".getBytes(); 676 buffos.write(buffer, 0, 10); 685 byte[] buffer = "1234567890".getBytes("UTF-8"); 688 buffos.write(buffer, 0, 10); 696 assertEquals(buffer[i], byteArrayis.read()); 699 buffos.write(buffer, 0, 10); 707 assertEquals(buffer[i], byteArrayis.read()); 710 assertEquals(buffer[i], byteArrayis.read()); 713 buffos.write(buffer, [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
H A D | SinkChannelTest.java | 46 private ByteBuffer buffer; field in class:SinkChannelTest 55 buffer = ByteBuffer.wrap("bytes".getBytes(ISO8859_1)); 71 ByteBuffer[] bufArray = { buffer, positionedBuffer }; 163 int written = sink.write(buffer); 172 sink.write(buffer); 182 ByteBuffer[] bufArray = { buffer, positionedBuffer }; 188 buffer.position(0); 206 assertEquals(BUFFER_SIZE, buffer.position()); 226 ByteBuffer[] nullBufArray = { buffer, nullBuf }; 236 ByteBuffer[] bufArray = { buffer }; [all...] |
H A D | SourceChannelTest.java | 42 private ByteBuffer buffer; field in class:SourceChannelTest 51 buffer = ByteBuffer.wrap("bytes".getBytes(ISO8859_1)); 91 sink.write(buffer); 154 ByteBuffer[] bufArray = { buffer, positionedBuffer }; 164 buffer.position(0); 223 ByteBuffer[] nullBufArray2 = { buffer, nullBuf }; 238 sink.write(buffer); 297 ByteBuffer[] bufArray = { buffer, positionedBuffer }; 308 buffer.position(0); 403 ByteBuffer[] nullBufArray2 = { buffer, nullBu [all...] |
/libcore/luni/src/main/java/java/nio/ |
H A D | PipeImpl.java | 78 public int read(ByteBuffer buffer) throws IOException { argument 79 return channel.read(buffer); 113 public int write(ByteBuffer buffer) throws IOException { argument 114 return channel.write(buffer);
|
/libcore/luni/src/main/java/org/apache/harmony/security/asn1/ |
H A D | ASN1Boolean.java | 78 if (in.buffer[in.contentOffset] == 0) {
|
H A D | ASN1BitString.java | 80 System.arraycopy(in.buffer, in.contentOffset + 1, bytes, 0, 82 return new BitString(bytes, in.buffer[in.contentOffset]); 115 int unusedBits = in.buffer[in.contentOffset]; 142 byte octet = in.buffer[in.contentOffset + i]; 148 octet = in.buffer[in.contentOffset + i];
|
/libcore/luni/src/test/java/libcore/javax/crypto/ |
H A D | CipherInputStreamTest.java | 83 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument 84 int numRead = super.read(buffer, byteOffset, byteCount); 168 byte[] buffer = new byte[1024]; 169 while ((count = in.read(buffer)) != -1) { 170 out.write(buffer, 0, count); 193 byte[] buffer = new byte[128]; 195 is.read(buffer); 201 is.read(buffer, 0, buffer.length);
|
H A D | ECDHKeyAgreementTest.java | 266 byte[] buffer = new byte[KAT_SECRET.length]; 267 int secretLengthBytes = keyAgreement.generateSecret(buffer, 0); 269 assertTrue(Arrays.equals(KAT_SECRET, buffer)); 281 // Place the shared secret in the middle of the larger buffer and check that only that 282 // part of the buffer is affected. 283 byte[] buffer = new byte[KAT_SECRET.length + 2]; 284 buffer[0] = (byte) 0x85; // arbitrary canary value 285 buffer[buffer.length - 1] = (byte) 0x3b; // arbitrary canary value 286 int secretLengthBytes = keyAgreement.generateSecret(buffer, [all...] |
/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++];
|
/libcore/luni/src/main/java/java/io/ |
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 | RandomAccessFile.java | 262 * byte array {@code buffer}. The maximum number of bytes read corresponds 263 * to the size of {@code buffer}. Blocks until at least one byte has been 271 public int read(byte[] buffer) throws IOException { argument 272 return read(buffer, 0, buffer.length); 277 * and stores them in the byte array {@code buffer} starting at {@code 284 * if {@code byteOffset < 0 || byteCount < 0 || byteOffset + byteCount > buffer.length}. 288 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument 289 return IoBridge.read(fd, buffer, byteOffset, byteCount); 667 * Writes the entire contents of the byte array {@code buffer} t 675 write(byte[] buffer) argument 690 write(byte[] buffer, int byteOffset, int byteCount) argument [all...] |
H A D | CharArrayWriter.java | 33 * The buffer for characters. 38 * The ending index of the buffer. 43 * Constructs a new {@code CharArrayWriter} which has a buffer allocated 44 * with the default size of 32 characters. This buffer is also used as the 53 * Constructs a new {@code CharArrayWriter} which has a buffer allocated 54 * with the size of {@code initialSize} characters. The buffer is also used 58 * the initial size of this CharArrayWriters buffer. 79 /* Can the buffer handle @i more chars, if not expand it */ 100 * of the buffer. All written characters are lost and the size of this 155 * @param buffer 166 write(char[] buffer, int offset, int len) argument [all...] |
H A D | DataOutputStream.java | 79 * Writes {@code count} bytes from the byte array {@code buffer} starting at 82 * @param buffer 83 * the buffer to write to the target stream. 85 * the index of the first byte in {@code buffer} to write. 87 * the number of bytes from the {@code buffer} to write. 91 * if {@code buffer} is {@code null}. 94 public void write(byte[] buffer, int offset, int count) throws IOException { argument 95 if (buffer == null) { 96 throw new NullPointerException("buffer == null"); 98 out.write(buffer, offse [all...] |
/libcore/luni/src/main/java/java/util/zip/ |
H A D | GZIPInputStream.java | 32 * its buffer. 93 * underlying stream. Set the internal buffer size to {@code size}. 98 * the internal read buffer size. 129 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument 136 Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount); 140 bytesRead = super.read(buffer, byteOffset, byteCount); 146 crc.update(buffer, byteOffset, bytesRead); 164 // If we have any unconsumed data in the inflater buffer, we have to 173 // (worst case) the entire buffer even though there may be fewer bytes 182 final byte[] buffer; [all...] |
H A D | DeflaterOutputStream.java | 37 * The buffer for the data to be written to. 65 * Constructs a new instance with the given {@code Deflater} and buffer size. 89 * Constructs a new instance with the given {@code Deflater}, buffer size, and 109 * Compress the data in the input buffer and write it to the underlying 170 @Override public void write(byte[] buffer, int offset, int byteCount) throws IOException { argument 174 Arrays.checkOffsetAndCount(buffer.length, offset, byteCount); 178 def.setInput(buffer, offset, byteCount);
|
H A D | InflaterInputStream.java | 45 * The input buffer used for decompression. 50 * The length of the buffer. 70 * settings for the {@code Inflater} and internal buffer are be used. In 95 * the internal buffer size to be used. 102 * the size to be used for the internal buffer. 135 * {@code buffer} starting at {@code byteOffset}. Returns the number of uncompressed bytes read, 139 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument 141 Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount); 158 int result = inf.inflate(buffer, byteOffset, byteCount); 183 * Fills the input buffer wit [all...] |
/libcore/luni/src/main/java/java/util/ |
H A D | AbstractMap.java | 434 StringBuilder buffer = new StringBuilder(size() * 28); 435 buffer.append('{'); 441 buffer.append(key); 443 buffer.append("(this Map)"); 445 buffer.append('='); 448 buffer.append(value); 450 buffer.append("(this Map)"); 453 buffer.append(", "); 456 buffer.append('}'); 457 return buffer [all...] |
H A D | Scanner.java | 89 private CharBuffer buffer = CharBuffer.allocate(1024); field in class:Scanner 105 // The length of the buffer. 308 * input may be cached if no line terminator exists in the buffer. 351 int oldLimit = buffer.limit(); 353 buffer.limit(horizonLineSeparator + terminatorLength); 372 buffer.limit(oldLimit); 381 buffer.limit(oldLimit); 388 buffer.limit(oldLimit); 460 // If horizon == 0, consider horizon as always outside buffer. 462 // First, try to find pattern within buffer [all...] |
/libcore/luni/src/main/java/java/net/ |
H A D | PlainSocketImpl.java | 236 @Override public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument 237 return socketImpl.read(buffer, byteOffset, byteCount); 265 @Override public void write(byte[] buffer, int offset, int byteCount) throws IOException { argument 266 socketImpl.write(buffer, offset, byteCount); 463 byte[] buffer = new byte[] { (byte) value }; 464 Libcore.os.sendto(fd, buffer, 0, 1, MSG_OOB, null, 0); 473 private int read(byte[] buffer, int offset, int byteCount) throws IOException { argument 477 Arrays.checkOffsetAndCount(buffer.length, offset, byteCount); 481 int readCount = IoBridge.recvfrom(true, fd, buffer, offset, byteCount, 0, null, false); 496 private void write(byte[] buffer, in argument [all...] |
/libcore/luni/src/main/java/libcore/io/ |
H A D | BlockGuardOs.java | 203 @Override public int pread(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException { argument 205 return os.pread(fd, buffer, offset); 213 @Override public int pwrite(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException { argument 215 return os.pwrite(fd, buffer, offset); 223 @Override public int read(FileDescriptor fd, ByteBuffer buffer) throws ErrnoException, InterruptedIOException { argument 225 return os.read(fd, buffer); 243 @Override public int recvfrom(FileDescriptor fd, ByteBuffer buffer, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException { argument 245 return os.recvfrom(fd, buffer, flags, srcAddress); 268 @Override public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { argument 270 return os.sendto(fd, buffer, flag 306 write(FileDescriptor fd, ByteBuffer buffer) argument [all...] |
/libcore/luni/src/test/java/libcore/javax/net/ |
H A D | ServerSocketFactoryTest.java | 125 byte[] buffer = new byte[1024]; 127 while ((count = in.read(buffer)) != -1) { 128 out.write(buffer, 0, count);
|