/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...] |
H A D | UnixNativeDispatcher.java | 42 NativeBuffer buffer = NativeBuffers.getNativeBufferFromCache(size); 43 if (buffer == null) { 44 buffer = NativeBuffers.allocNativeBuffer(size); 46 // buffer already contains the path 47 if (buffer.owner() == path) 48 return buffer; 50 NativeBuffers.copyCStringToNativeBuffer(cstr, buffer); 51 buffer.setOwner(path); 52 return buffer; 69 NativeBuffer buffer [all...] |
H A D | LinuxNativeDispatcher.java | 71 NativeBuffer buffer = NativeBuffers.asNativeBuffer(name); 73 return fgetxattr0(filedes, buffer.address(), valueAddress, valueLen); 75 buffer.release(); 88 NativeBuffer buffer = NativeBuffers.asNativeBuffer(name); 90 fsetxattr0(filedes, buffer.address(), valueAddress, valueLen); 92 buffer.release(); 103 NativeBuffer buffer = NativeBuffers.asNativeBuffer(name); 105 fremovexattr0(filedes, buffer.address()); 107 buffer.release();
|
/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 | 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/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 | Linux.java | 131 public int pread(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException { argument 133 final int position = buffer.position(); 135 if (buffer.isDirect()) { 136 bytesRead = preadBytes(fd, buffer, position, buffer.remaining(), offset); 138 bytesRead = preadBytes(fd, NioUtils.unsafeArray(buffer), NioUtils.unsafeArrayOffset(buffer) + position, buffer.remaining(), offset); 141 maybeUpdateBufferPosition(buffer, position, bytesRead); 148 private native int preadBytes(FileDescriptor fd, Object buffer, in argument 149 pwrite(FileDescriptor fd, ByteBuffer buffer, long offset) argument 166 pwriteBytes(FileDescriptor fd, Object buffer, int bufferOffset, int byteCount, long offset) argument 167 read(FileDescriptor fd, ByteBuffer buffer) argument 184 readBytes(FileDescriptor fd, Object buffer, int offset, int byteCount) argument 188 recvfrom(FileDescriptor fd, ByteBuffer buffer, int flags, InetSocketAddress srcAddress) argument 205 recvfromBytes(FileDescriptor fd, Object buffer, int byteOffset, int byteCount, int flags, InetSocketAddress srcAddress) argument 210 sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) argument 230 sendtoBytes(FileDescriptor fd, Object buffer, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) argument 231 sendtoBytes(FileDescriptor fd, Object buffer, int byteOffset, int byteCount, int flags, SocketAddress address) argument 272 write(FileDescriptor fd, ByteBuffer buffer) argument 288 writeBytes(FileDescriptor fd, Object buffer, int offset, int byteCount) argument 291 maybeUpdateBufferPosition(ByteBuffer buffer, int originalPosition, int bytesReadOrWritten) argument [all...] |
/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/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 66 * The internal buffer array where the data is stored. When necessary, 85 * the buffer. 95 * The current position in the buffer. This is the index of the next 126 * in the buffer array (though they may be 127 * moved to another place in the buffer array, 166 * Check to make sure that buffer has not been nulled out due to 170 byte[] buffer [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...] |
/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 | 60 byte[] buffer = new byte[1024]; 62 while ((count = in.read(buffer)) != -1) { 63 out.write(buffer, 0, count); 71 byte[] buffer = new byte[8]; 76 while ((count = in.read(buffer, 0, 5)) != -1) { 78 out.write(buffer, 0, count); 94 byte[] buffer = new byte[8]; 97 in.read(buffer, 0, 10); 107 in.read(buffer, -1, 5); 113 in.read(buffer, [all...] |