/libcore/luni/src/test/java/libcore/java/io/ |
H A D | OldFilterReaderTest.java | 58 public int read(char[] buffer, int offset, int count) throws IOException { argument 113 char[] buffer = new char[5]; 114 fr.read(buffer, 0, 5); 120 char[] buffer = new char[10]; 126 fr.read(buffer, 0, -1); 133 fr.read(buffer, -1, 1); 140 fr.read(buffer, 10, 1);
|
H A D | OldFilterWriterTest.java | 48 public void write(char[] buffer, int offset, int count) throws IOException { argument 96 char[] buffer = new char[5]; 97 fw.write(buffer, 0, 5); 102 char[] buffer = new char[10]; 108 fw.write(buffer, 0, -1); 115 fw.write(buffer, -1, 1); 122 fw.write(buffer, 10, 1);
|
H A D | InputStreamReaderTest.java | 37 char[] buffer = new char[1024]; 38 int count = reader.read(buffer);
|
/libcore/luni/src/test/java/libcore/java/nio/charset/ |
H A D | OldCharsetEncoderDecoderBufferTest.java | 28 * Checks for ICU encoder/decoder buffer corruption. 32 /* Checks for a buffer corruption that happens in ICU 34 * is done first with an out-buffer with hasArray()==true, and next with an out-buffer with 35 * hasArray()==false. In that situation ICU may overwrite the first out-buffer. 58 // check if the first buffer was corrupted by the second decode 64 /* Checks for a buffer corruption that happens in ICU 66 * is done first with an in-buffer with hasArray()==true, and next with an in-buffer with 67 * hasArray()==false. In that situation ICU may overwrite the array of the first in-buffer [all...] |
/libcore/ojluni/src/main/java/java/io/ |
H A D | PipedReader.java | 51 * The size of the pipe's circular input buffer. 56 * The circular buffer into which incoming data is placed. 58 char buffer[]; field in class:PipedReader 61 * The index of the position in the circular buffer at which the 63 * piped writer. <code>in<0</code> implies the buffer is empty, 64 * <code>in==out</code> implies the buffer is full 69 * The index of the position in the circular buffer at which the next 90 * pipe size for the pipe's buffer. Data written to <code>src</code> 94 * @param pipeSize the size of the pipe's buffer. 119 * the specified pipe size for the pipe's buffer [all...] |
H A D | StringBufferInputStream.java | 51 protected String buffer; field in class:StringBufferInputStream 54 * The index of the next character to read from the input stream buffer. 56 * @see java.io.StringBufferInputStream#buffer 61 * The number of valid characters in the input stream buffer. 63 * @see java.io.StringBufferInputStream#buffer 70 * @param s the underlying input buffer. 73 this.buffer = s; 86 * low eight bits of the next character in this input stream's buffer. 92 return (pos < count) ? (buffer.charAt(pos++) & 0xFF) : -1; 101 * low eight bits from the characters in this input stream's buffer int [all...] |
/libcore/ojluni/src/main/java/java/util/logging/ |
H A D | MemoryHandler.java | 30 * <tt>Handler</tt> that buffers requests in a circular buffer in memory. 33 * into its memory buffer and discards earlier records. This buffering 35 * conditions, the <tt>MemoryHandler</tt> will push out its current buffer 39 * There are three main models for triggering a push of the buffer: 67 * defines the buffer size (defaults to 1000). </li> 95 private LogRecord buffer[]; field in class:MemoryHandler 152 buffer = new LogRecord[size]; 162 * argument and buffer size argument are used. 165 * @param size the number of log records to buffer (must be greater than zero) 187 * Store a <tt>LogRecord</tt> in an internal buffer [all...] |
/libcore/ojluni/src/main/java/sun/security/util/ |
H A D | DerValue.java | 66 protected DerInputBuffer buffer; field in class:DerValue 245 buffer = new DerInputBuffer(data.clone()); 247 this.data = new DerInputStream(buffer); 280 buffer = inbuf.dup(); 281 buffer.truncate(length); 282 data = new DerInputStream(buffer); 289 buffer = in.dup(); 290 buffer.truncate(length); 291 data = new DerInputStream(buffer); 304 * Get an ASN.1/DER encoded datum from a buffer [all...] |
/libcore/ojluni/src/main/java/sun/nio/fs/ |
H A D | LinuxUserDefinedFileAttributeView.java | 64 // Parses buffer as array of NULL-terminated C strings. 106 NativeBuffer buffer = null; 109 buffer = NativeBuffers.getNativeBuffer(size); 112 int n = flistxattr(fd, buffer.address(), size); 113 List<String> list = asList(buffer.address(), n); 116 // allocate larger buffer if required 118 buffer.release(); 120 buffer = null; 121 buffer = NativeBuffers.getNativeBuffer(size); 130 if (buffer ! [all...] |
/libcore/luni/src/test/java/libcore/java/util/logging/ |
H A D | OldErrorManagerTest.java | 55 public void write(byte[] buffer) { argument 56 linesWritten.append(new String(buffer)); 60 public synchronized void write(byte[] buffer, int offset, int len) { argument 61 linesWritten.append(new String(buffer, offset, len));
|
/libcore/ojluni/src/main/java/java/text/ |
H A D | CharacterIteratorFieldDelegate.java | 57 StringBuffer buffer) { 79 buffer.substring(size, start))); 86 buffer.substring(aStart, end)); 96 int start, int end, StringBuffer buffer) { 97 formatted(attr, value, start, end, buffer); 56 formatted(Format.Field attr, Object value, int start, int end, StringBuffer buffer) argument 95 formatted(int fieldID, Format.Field attr, Object value, int start, int end, StringBuffer buffer) argument
|
/libcore/luni/src/main/java/javax/xml/namespace/ |
H A D | QName.java | 372 StringBuilder buffer = new StringBuilder(nsLength + localPart.length() + 2); 373 buffer.append('{'); 374 buffer.append(namespaceURI); 375 buffer.append('}'); 376 buffer.append(localPart); 377 _qNameAsString = buffer.toString();
|
/libcore/xml/src/main/java/org/kxml2/io/ |
H A D | KXmlParser.java | 113 * If non-null, the contents of the read buffer must be copied into this 114 * string builder before the read buffer is overwritten. This is used to 142 private char[] buffer = new char[8192]; field in class:KXmlParser 147 * Track the number of newlines and columns preceding the current buffer. To 148 * compute the line and column of a position in the buffer, compute the line 149 * and column in the buffer and add the preceding values. 482 result.append(buffer, start, position - start); 492 // TODO: replace with Arrays.equals(buffer, position, delimiter, 0, delimiter.length) 495 if (buffer[position + i] != delimiter[i]) { 510 return stringPool.get(buffer, star 2147 private final char[] buffer; field in class:KXmlParser.ContentSource 2150 ContentSource(ContentSource next, char[] buffer, int position, int limit) argument [all...] |
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
H A D | MembershipKeyTest.java | 113 ByteBuffer buffer = ByteBuffer.allocate(1048); 114 client.receive(buffer); 115 buffer.flip(); 116 assertEquals(0, buffer.limit()); 179 ByteBuffer buffer = ByteBuffer.allocate(1048); 180 client.receive(buffer); 181 buffer.flip(); 182 assertEquals(0, buffer.limit()); 229 ByteBuffer buffer = ByteBuffer.allocate(1048); 230 client.receive(buffer); [all...] |
H A D | FileIOInterruptTest.java | 104 byte[] buffer = new byte[10]; 106 fis.read(buffer); 144 byte[] buffer = new byte[10]; 148 fos.write(buffer); 197 ByteBuffer buffer = ByteBuffer.allocateDirect(10); 200 fileInputChannel.read(buffer); 203 fileInputChannel.read(new ByteBuffer[] { buffer, buffer2}); 230 ByteBuffer buffer = ByteBuffer.allocateDirect(10); 233 fileInputChannel.read(buffer); 236 fileInputChannel.read(new ByteBuffer[] { buffer, buffer [all...] |
/libcore/luni/src/test/java/libcore/java/net/ |
H A D | OldAndroidDatagramTest.java | 46 byte[] buffer = new byte[256]; field in class:OldAndroidDatagramTest.Reflector 58 packet.setLength(buffer.length); 90 packet = new DatagramPacket(buffer, buffer.length); 128 byte[] buffer = new byte[256]; 130 DatagramPacket packet = new DatagramPacket(buffer, buffer.length); 149 packet.setLength(buffer.length);
|
/libcore/benchmarks/src/benchmarks/ |
H A D | BufferedZipFileBenchmark.java | 61 byte[] buffer = new byte[readSize]; 62 while (in.read(buffer) != -1) { 74 byte[] buffer = new byte[readSize]; 75 while (in.read(buffer) != -1) {
|
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/ |
H A D | CommentImpl.java | 53 return buffer.indexOf("--") != -1;
|
/libcore/luni/src/main/java/java/nio/ |
H A D | NioUtils.java | 38 public static void freeDirectBuffer(ByteBuffer buffer) { argument 39 if (buffer == null) { 43 DirectByteBuffer dbb = (DirectByteBuffer) buffer; 71 * Normally, attempting to access the array backing a read-only buffer throws.
|
/libcore/ojluni/src/main/java/java/util/ |
H A D | Base64.java | 320 * Encodes all remaining bytes from the specified byte buffer into 324 * Upon return, the source buffer's position will be updated to 326 * output buffer's position will be zero and its limit will be the 329 * @param buffer 331 * @return A newly-allocated byte buffer containing the encoded bytes. 333 public ByteBuffer encode(ByteBuffer buffer) { argument 334 int len = outLength(buffer.remaining()); 337 if (buffer.hasArray()) { 338 ret = encode0(buffer.array(), 339 buffer 606 decode(ByteBuffer buffer) argument [all...] |
/libcore/luni/src/test/java/libcore/java/util/zip/ |
H A D | OldAndroidZipStressTest.java | 80 byte[] buffer = new byte[512]; 87 int j = stream.read(buffer); 89 j = stream.read(buffer); 99 byte[] buffer = new byte[512]; 106 int j = stream.read(buffer); 108 j = stream.read(buffer);
|
/libcore/ojluni/src/main/java/java/util/stream/ |
H A D | Streams.java | 305 // -3 == two or more elements, held by buffer 338 SpinedBuffer<T> buffer; field in class:Streams.StreamBuilderImpl 364 if (buffer == null) { 365 buffer = new SpinedBuffer<>(); 366 buffer.accept(first); 370 buffer.accept(t); 389 // the spliterator of the spined buffer 390 return (c < 2) ? StreamSupport.stream(this, false) : StreamSupport.stream(buffer.spliterator(), false); 434 SpinedBuffer.OfInt buffer; field in class:Streams.IntStreamBuilderImpl 460 if (buffer 525 SpinedBuffer.OfLong buffer; field in class:Streams.LongStreamBuilderImpl 616 SpinedBuffer.OfDouble buffer; field in class:Streams.DoubleStreamBuilderImpl [all...] |
/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/ojluni/src/main/java/java/util/jar/ |
H A D | Attributes.java | 303 StringBuffer buffer = new StringBuffer( 305 buffer.append(": "); 312 buffer.append(value); 314 buffer.append("\r\n"); 315 Manifest.make72Safe(buffer); 316 os.writeBytes(buffer.toString()); 350 StringBuffer buffer = new StringBuffer(name); 351 buffer.append(": "); 358 buffer.append(value); 360 buffer [all...] |
/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];
|