/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)); 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/ojluni/src/main/java/sun/security/util/ |
H A D | DerInputStream.java | 67 DerInputBuffer buffer; field in class:DerInputStream 73 * Create a DER input stream from a data buffer. The buffer is not 74 * copied, it is shared. Accordingly, the buffer should be treated 77 * @param data the buffer from which to create the string (CONSUMED) 84 * Create a DER input stream from part of a data buffer. 85 * The buffer is not copied, it is shared. Accordingly, the 86 * buffer should be treated as read-only. 88 * @param data the buffer from which to create the string (CONSUMED) 91 * @param len how long a chunk of the buffer t [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
H A D | ASCCharsetDecoderTest.java | 48 // ByteBuffer buffer = ByteBuffer.allocate(8); 49 // buffer.put((byte)-1); 50 // buffer.put(unibytes); 51 // buffer.flip(); 52 // return buffer; 58 ByteBuffer buffer = ByteBuffer.allocate(8); 59 buffer.put((byte) -1); 60 buffer.put(getByteBuffer()); 61 buffer.flip(); 62 return buffer; [all...] |
H A D | GBCharsetDecoderTest.java | 53 ByteBuffer buffer = ByteBuffer.allocate(20); 54 buffer.put(new byte[] { (byte) 0xd8 }); 55 buffer.put(getByteBuffer()); 56 buffer.flip(); 57 return buffer;
|
H A D | UTFCharsetDecoderTest.java | 53 ByteBuffer buffer = ByteBuffer.allocate(getByteBuffer().remaining() + 1); 54 buffer.put((byte) 0xd8); 55 buffer.put(getByteBuffer()); 56 buffer.flip(); 57 return buffer; 65 return " buffer \u041c\u0430\u0441\u044e\u043b\u044f \u611b";
|
/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/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...] |
H A D | Streams.java | 37 byte[] buffer = new byte[1024]; 40 while ((count = source.read(buffer)) != -1) { 41 out.write(buffer, 0, count); 50 char[] buffer = new char[1024]; 53 while ((count = fileReader.read(buffer)) != -1) { 54 out.write(buffer, 0, 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/zip/ |
H A D | Adler32.java | 82 * 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/luni/src/main/java/javax/xml/parsers/ |
H A D | FilePathToURI.java | 64 StringBuilder buffer = new StringBuilder(len*3); 65 buffer.append("file://"); 70 buffer.append('/'); 82 buffer.append('%'); 83 buffer.append(gAfterEscaping1[ch]); 84 buffer.append(gAfterEscaping2[ch]); 88 buffer.append((char)ch); 111 buffer.append('%'); 112 buffer.append(gHexChs[ch >> 4]); 113 buffer [all...] |
/libcore/luni/src/main/java/javax/xml/transform/stream/ |
H A D | FilePathToURI.java | 64 StringBuilder buffer = new StringBuilder(len*3); 65 buffer.append("file://"); 70 buffer.append('/'); 82 buffer.append('%'); 83 buffer.append(gAfterEscaping1[ch]); 84 buffer.append(gAfterEscaping2[ch]); 88 buffer.append((char)ch); 111 buffer.append('%'); 112 buffer.append(gHexChs[ch >> 4]); 113 buffer [all...] |
/libcore/luni/src/main/java/libcore/io/ |
H A D | Streams.java | 40 byte[] buffer = new byte[1]; 41 int result = in.read(buffer, 0, 1); 42 return (result != -1) ? buffer[0] & 0xff : -1; 51 byte[] buffer = new byte[1]; 52 buffer[0] = (byte) (b & 0xff); 53 out.write(buffer); 106 byte[] buffer = new byte[1024]; 108 while ((count = in.read(buffer)) != -1) { 109 bytes.write(buffer, 0, count); 120 char[] buffer [all...] |
H A D | Posix.java | 118 public int pread(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException { argument 120 final int position = buffer.position(); 122 if (buffer.isDirect()) { 123 bytesRead = preadBytes(fd, buffer, position, buffer.remaining(), offset); 125 bytesRead = preadBytes(fd, NioUtils.unsafeArray(buffer), NioUtils.unsafeArrayOffset(buffer) + position, buffer.remaining(), offset); 128 maybeUpdateBufferPosition(buffer, position, bytesRead); 135 private native int preadBytes(FileDescriptor fd, Object buffer, in argument 136 pwrite(FileDescriptor fd, ByteBuffer buffer, long offset) argument 153 pwriteBytes(FileDescriptor fd, Object buffer, int bufferOffset, int byteCount, long offset) argument 154 read(FileDescriptor fd, ByteBuffer buffer) argument 171 readBytes(FileDescriptor fd, Object buffer, int offset, int byteCount) argument 175 recvfrom(FileDescriptor fd, ByteBuffer buffer, int flags, InetSocketAddress srcAddress) argument 192 recvfromBytes(FileDescriptor fd, Object buffer, int byteOffset, int byteCount, int flags, InetSocketAddress srcAddress) argument 197 sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) argument 217 sendtoBytes(FileDescriptor fd, Object buffer, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) argument 218 sendtoBytes(FileDescriptor fd, Object buffer, int byteOffset, int byteCount, int flags, SocketAddress address) argument 259 write(FileDescriptor fd, ByteBuffer buffer) argument 275 writeBytes(FileDescriptor fd, Object buffer, int offset, int byteCount) argument 278 maybeUpdateBufferPosition(ByteBuffer buffer, int originalPosition, int bytesReadOrWritten) argument [all...] |
/libcore/dex/src/main/java/com/android/dex/ |
H A D | ClassDef.java | 24 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/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...] |
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);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
H A D | StringBufferTest.java | 33 StringBuffer buffer = new StringBuffer("abcde"); 35 buffer.setLength(-1); 41 assertEquals("abcde", buffer.toString()); 42 buffer.setLength(1); 43 buffer.append('f'); 44 assertEquals("af", buffer.toString()); 46 buffer = new StringBuffer("abcde"); 47 assertEquals("cde", buffer.substring(2)); 48 buffer.setLength(3); 49 buffer [all...] |
/libcore/ojluni/src/main/java/sun/security/pkcs/ |
H A D | SigningCertificateInfo.java | 95 StringBuffer buffer = new StringBuffer(); 96 buffer.append("[\n"); 98 buffer.append(certId[i].toString()); 101 buffer.append("\n]"); 103 return buffer.toString(); 154 StringBuffer buffer = new StringBuffer(); 155 buffer.append("[\n\tCertificate hash (SHA-1):\n"); 159 buffer.append(hexDumper.encode(certHash)); 161 buffer.append("\n\tIssuer: " + issuer + "\n"); 162 buffer [all...] |
/libcore/ojluni/src/main/java/java/io/ |
H A D | BufferedInputStream.java | 32 * the ability to buffer the input and to 35 * is created, an internal buffer array is 37 * or skipped, the internal buffer is refilled 56 * The internal buffer array where the data is stored. When necessary, 75 * the buffer. 85 * The current position in the buffer. This is the index of the next 116 * in the buffer array (though they may be 117 * moved to another place in the buffer array, 156 * Check to make sure that buffer has not been nulled out due to 160 byte[] buffer [all...] |
H A D | PipedInputStream.java | 45 * 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<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 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/text/ |
H A D | DontCareFieldPosition.java | 39 int end, StringBuffer buffer) { 42 int start, int end, StringBuffer buffer) {
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
H A D | DeflaterInputStreamTest.java | 55 byte[] buffer = new byte[1024]; 57 while ((count = in.read(buffer)) != -1) { 58 out.write(buffer, 0, count); 65 byte[] buffer = new byte[8]; 70 while ((count = in.read(buffer, 0, 5)) != -1) { 72 out.write(buffer, 0, count); 88 byte[] buffer = new byte[8]; 91 in.read(buffer, 0, 10); 101 in.read(buffer, -1, 5); 107 in.read(buffer, [all...] |