/libcore/luni/src/test/native/ |
H A D | libcore_java_nio_BufferTest.cpp | 21 JNIEnv* env, jobject /* clazz */, jobject buffer) { 22 return reinterpret_cast<jlong>(env->GetDirectBufferAddress(buffer)); 26 JNIEnv* env, jobject /* clazz */, jobject buffer) { 27 return reinterpret_cast<jlong>(env->GetDirectBufferCapacity(buffer)); 33 // nullptr providing the buffer is zero length. 20 Java_libcore_java_nio_BufferTest_jniGetDirectBufferAddress( JNIEnv* env, jobject , jobject buffer) argument 25 Java_libcore_java_nio_BufferTest_jniGetDirectBufferCapacity( JNIEnv* env, jobject , jobject buffer) argument
|
/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/io/ |
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...] |
H A D | PipedInputStream.java | 42 * The piped input stream contains a buffer, 68 * The default size of the pipe's circular input buffer. 77 * The circular buffer into which incoming data is placed. 80 protected byte buffer[]; field in class:PipedInputStream 83 * The index of the position in the circular buffer at which the 85 * piped output stream. <code>in<0</code> implies the buffer is empty, 86 * <code>in==out</code> implies the buffer is full 92 * The index of the position in the circular buffer at which the next 116 * the pipe's buffer. 121 * @param pipeSize the size of the pipe's buffer [all...] |
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...] |
/libcore/ojluni/src/main/java/java/nio/ |
H A D | CharBufferSpliterator.java | 40 private final CharBuffer buffer; field in class:CharBufferSpliterator 44 CharBufferSpliterator(CharBuffer buffer) { argument 45 this(buffer, buffer.position(), buffer.limit()); 48 CharBufferSpliterator(CharBuffer buffer, int origin, int limit) { argument 50 this.buffer = buffer; 60 : new CharBufferSpliterator(buffer, lo, index = mid); 67 CharBuffer cb = buffer; [all...] |
/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
|
H A D | Format.java | 162 * buffer. 171 * @return the string buffer passed in as <code>toAppendTo</code>, 385 * @param end End of the field, will be >= start and <= buffer.length() 386 * @param buffer Contains current formatted value, receiver should 390 int end, StringBuffer buffer); 399 * @param end End of the field, will be >= start and <= buffer.length() 400 * @param buffer Contains current formatted value, receiver should 404 int start, int end, StringBuffer buffer); 389 formatted(Format.Field attr, Object value, int start, int end, StringBuffer buffer) argument 403 formatted(int fieldID, Format.Field attr, Object value, int start, int end, StringBuffer buffer) argument
|
/libcore/ojluni/src/main/java/java/util/zip/ |
H A D | Adler32.java | 92 * Updates the checksum with the bytes from the specified buffer. 95 * buffer.{@link java.nio.Buffer#remaining() remaining()} 97 * buffer.{@link java.nio.Buffer#position() position()} 98 * Upon return, the buffer's position will be updated to its 101 * @param buffer the ByteBuffer to update the checksum with 104 public void update(ByteBuffer buffer) { argument 105 int pos = buffer.position(); 106 int limit = buffer.limit(); 111 if (buffer instanceof DirectBuffer) { 112 adler = updateByteBuffer(adler, ((DirectBuffer)buffer) [all...] |
H A D | CRC32.java | 89 * Updates the checksum with the bytes from the specified buffer. 92 * buffer.{@link java.nio.Buffer#remaining() remaining()} 94 * buffer.{@link java.nio.Buffer#position() position()} 95 * Upon return, the buffer's position will 98 * @param buffer the ByteBuffer to update the checksum with 101 public void update(ByteBuffer buffer) { argument 102 int pos = buffer.position(); 103 int limit = buffer.limit(); 108 if (buffer instanceof DirectBuffer) { 109 crc = updateByteBuffer(crc, ((DirectBuffer)buffer) [all...] |
/libcore/ojluni/src/main/java/sun/nio/fs/ |
H A D | NativeBuffers.java | 44 * Allocates a native buffer, of at least the given size, from the heap. 53 * Returns a native buffer, of at least the given size, from the thread 61 NativeBuffer buffer = buffers[i]; 62 if (buffer != null && buffer.size() >= size) { 64 return buffer; 72 * Returns a native buffer, of at least the given size. The native buffer 77 NativeBuffer buffer = getNativeBufferFromCache(size); 78 if (buffer ! 90 releaseNativeBuffer(NativeBuffer buffer) argument 123 copyCStringToNativeBuffer(byte[] cstr, NativeBuffer buffer) argument [all...] |
/libcore/benchmarks/src/benchmarks/regression/ |
H A D | SSLSocketBenchmark.java | 34 final byte[] buffer = new byte[BUFFER_SIZE]; field in class:SSLSocketBenchmark 88 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++];
|
/libcore/luni/src/test/java/libcore/java/io/ |
H A D | OldOutputStreamTest.java | 28 private byte[] buffer; field in class:OldOutputStreamTest.BasicOutputStream 32 buffer = new byte[BUFFER_SIZE]; 38 buffer[position] = (byte) (oneByte & 255); 41 throw new IOException("Internal buffer overflow."); 46 return buffer; 56 byte[] buffer; 65 buffer = bos.getBuffer(); 67 expected = (shortByteArray[i] == buffer[i]); 81 byte[] buffer; 90 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/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/support/src/test/java/tests/support/ |
H A D | Support_OutputStream.java | 17 private byte[] buffer; field in class:Support_OutputStream 35 buffer = new byte[bufferSize]; 58 public void write(byte buffer[]) throws IOException { argument 62 for (int i = 0; i < buffer.length; i++) { 63 write(buffer[i]); 68 public void write(byte buffer[], int offset, int count) throws IOException { argument 72 if (offset < 0 || count < 0 || (offset + count) > buffer.length) { 76 write(buffer[i]); 86 buffer[position] = (byte)(oneByte & 255); 89 throw new IOException("Internal buffer overflo [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];
|
H A D | InputStreamReaderTest.java | 76 public int read(byte[] buffer, int offset, int length) { argument 83 buffer[offset] = bytes[bytes.length - count];
|
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/ |
H A D | CharacterDataImpl.java | 35 protected StringBuffer buffer; field in class:CharacterDataImpl 43 buffer.append(arg); 47 buffer.delete(offset, offset + count); 51 return buffer.toString(); 58 stringBuilder.append(buffer); 62 return buffer.length(); 72 buffer.insert(offset, arg); 81 buffer.replace(offset, offset + count, arg); 88 buffer = new StringBuffer(data); 93 return buffer [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/misc/ |
H A D | CharacterDecoder.java | 52 * Of course in the simplest encoding schemes, the buffer has no 57 * chunk of data is referred to as a <i>buffer</i>. Encoded buffers 96 /** decode the beginning of the buffer, by default this is a NOP. */ 99 /** decode the buffer suffix, again by default it is a NOP. */ 133 protected int readFully(InputStream in, byte buffer[], int offset, int len) argument 139 buffer[i+offset] = (byte)q; 183 * buffer and returns a byte array containing the data. 199 * Decode the contents of the inputstream into a buffer.
|
H A D | CharacterEncoder.java | 53 * chunk of data is referred to as a <i>buffer</i>. Encoded buffers 88 * Encode the prefix for the entire buffer. By default is simply 96 * Encode the suffix for the entire buffer. 124 protected int readFully(InputStream in, byte buffer[]) argument 126 for (int i = 0; i < buffer.length; i++) { 130 buffer[i] = (byte)q; 132 return buffer.length; 173 * Encode the buffer in <i>aBuffer</i> and write the encoded 183 * A 'streamless' version of encode that simply takes a buffer of 184 * bytes and returns a string containing the encoded buffer [all...] |
/libcore/ojluni/src/main/java/sun/security/util/ |
H A D | ManifestEntryVerifier.java | 157 public void update(byte buffer) { argument 161 digests.get(i).update(buffer); 168 public void update(byte buffer[], int off, int len) { argument 172 digests.get(i).update(buffer, off, len);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
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...] |