Searched defs:buffer (Results 1 - 25 of 63) sorted by relevance

123

/libcore/luni/src/test/native/
H A Dlibcore_java_nio_BufferTest.cpp21 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));
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 DNioUtils.java38 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 DStringBufferInputStream.java51 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 DPipedInputStream.java45 * The piped input stream contains a buffer,
71 * The default size of the pipe's circular input buffer.
80 * The circular buffer into which incoming data is placed.
83 protected byte buffer[]; field in class:PipedInputStream
86 * The index of the position in the circular buffer at which the
88 * piped output stream. <code>in&lt;0</code> implies the buffer is empty,
89 * <code>in==out</code> implies the buffer is full
95 * The index of the position in the circular buffer at which the next
119 * the pipe's buffer.
124 * @param pipeSize the size of the pipe's buffer
[all...]
H A DPipedReader.java54 * The size of the pipe's circular input buffer.
59 * The circular buffer into which incoming data is placed.
61 char buffer[]; field in class:PipedReader
64 * The index of the position in the circular buffer at which the
66 * piped writer. <code>in&lt;0</code> implies the buffer is empty,
67 * <code>in==out</code> implies the buffer is full
72 * The index of the position in the circular buffer at which the next
93 * pipe size for the pipe's buffer. Data written to <code>src</code>
97 * @param pipeSize the size of the pipe's buffer.
122 * the specified pipe size for the pipe's buffer
[all...]
/libcore/ojluni/src/main/java/java/nio/
H A DCharBufferSpliterator.java40 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 DCharacterIteratorFieldDelegate.java57 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 DFormat.java162 * 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 DAdler32.java82 * Updates the checksum with the bytes from the specified buffer.
85 * buffer.{@link java.nio.Buffer#remaining() remaining()}
87 * buffer.{@link java.nio.Buffer#position() position()}
88 * Upon return, the buffer's position will be updated to its
91 * @param buffer the ByteBuffer to update the checksum with
93 private void update(ByteBuffer buffer) { argument
94 int pos = buffer.position();
95 int limit = buffer.limit();
100 if (buffer instanceof DirectBuffer) {
101 adler = updateByteBuffer(adler, ((DirectBuffer)buffer)
[all...]
/libcore/benchmarks/src/benchmarks/regression/
H A DSSLSocketBenchmark.java34 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 DScannerParseLargeFileBenchmarkTest.java53 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 DOldOutputStreamTest.java28 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...]
H A DOldFilterReaderTest.java58 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);
/libcore/luni/src/test/java/libcore/java/net/
H A DOldAndroidDatagramTest.java46 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 DOldErrorManagerTest.java55 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 DSupport_OutputStream.java17 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/dex/src/main/java/com/android/dex/
H A DClassDef.java24 private final Dex buffer; field in class:ClassDef
35 public ClassDef(Dex buffer, int offset, int typeIndex, int accessFlags, argument
38 this.buffer = buffer;
67 return buffer.readTypeList(interfacesOffset).getTypes();
91 if (buffer == null) {
96 result.append(buffer.typeNames().get(typeIndex));
98 result.append(" extends ").append(buffer.typeNames().get(supertypeIndex));
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DWriterTest.java121 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 DInputStreamReaderTest.java76 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 DCharacterDataImpl.java35 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 DMemoryHandler.java30 * <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:
65 * defines the buffer size (defaults to 1000).
81 private LogRecord buffer[]; field in class:MemoryHandler
132 buffer = new LogRecord[size];
142 * argument and buffer size argument are used.
145 * @param size the number of log records to buffer (must be greater than zero)
167 * Store a <tt>LogRecord</tt> in an internal buffer
[all...]
/libcore/ojluni/src/main/java/sun/misc/
H A DCharacterDecoder.java52 * 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 DCharacterEncoder.java53 * 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 DManifestEntryVerifier.java159 public void update(byte buffer) { argument
163 digests.get(i).update(buffer);
170 public void update(byte buffer[], int off, int len) { argument
174 digests.get(i).update(buffer, off, len);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
H A DSourceChannelTest.java42 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...]

Completed in 1533 milliseconds

123