/libcore/ojluni/src/main/java/sun/security/util/ |
D | DerInputStream.java | 67 DerInputBuffer buffer; field in DerInputStream 135 buffer = new DerInputBuffer(derIn.convert(inData)); in init() 138 buffer = new DerInputBuffer(data, offset, len); in init() 139 buffer.mark(Integer.MAX_VALUE); in init() 143 buffer = buf; in DerInputStream() 144 buffer.mark(Integer.MAX_VALUE); in DerInputStream() 159 DerInputBuffer newbuf = buffer.dup(); in subStream() 163 buffer.skip(len); in subStream() 173 return buffer.toByteArray(); in toByteArray() 192 if (buffer.read() != DerValue.tag_Integer) { in getInteger() [all …]
|
D | DerValue.java | 66 protected DerInputBuffer buffer; field in DerValue 245 buffer = new DerInputBuffer(data.clone()); in DerValue() 247 this.data = new DerInputStream(buffer); in DerValue() 280 buffer = inbuf.dup(); in DerValue() 281 buffer.truncate(length); in DerValue() 282 data = new DerInputStream(buffer); in DerValue() 289 buffer = in.dup(); in DerValue() 290 buffer.truncate(length); in DerValue() 291 data = new DerInputStream(buffer); in DerValue() 368 buffer = new DerInputBuffer(buf); in init() [all …]
|
/libcore/ojluni/src/main/java/sun/nio/fs/ |
D | UnixNativeDispatcher.java | 42 NativeBuffer buffer = NativeBuffers.getNativeBufferFromCache(size); in copyToNativeBuffer() local 43 if (buffer == null) { in copyToNativeBuffer() 44 buffer = NativeBuffers.allocNativeBuffer(size); in copyToNativeBuffer() 47 if (buffer.owner() == path) in copyToNativeBuffer() 48 return buffer; in copyToNativeBuffer() 50 NativeBuffers.copyCStringToNativeBuffer(cstr, buffer); in copyToNativeBuffer() 51 buffer.setOwner(path); in copyToNativeBuffer() 52 return buffer; in copyToNativeBuffer() 69 NativeBuffer buffer = copyToNativeBuffer(path); in open() local 71 return open0(buffer.address(), flags, mode); in open() [all …]
|
D | NativeBuffers.java | 61 NativeBuffer buffer = buffers[i]; in getNativeBufferFromCache() local 62 if (buffer != null && buffer.size() >= size) { in getNativeBufferFromCache() 64 return buffer; in getNativeBufferFromCache() 77 NativeBuffer buffer = getNativeBufferFromCache(size); in getNativeBuffer() local 78 if (buffer != null) { in getNativeBuffer() 79 buffer.setOwner(null); in getNativeBuffer() 80 return buffer; in getNativeBuffer() 90 static void releaseNativeBuffer(NativeBuffer buffer) { in releaseNativeBuffer() argument 95 buffers[0] = buffer; in releaseNativeBuffer() 102 buffers[i] = buffer; in releaseNativeBuffer() [all …]
|
D | LinuxNativeDispatcher.java | 71 NativeBuffer buffer = NativeBuffers.asNativeBuffer(name); in fgetxattr() local 73 return fgetxattr0(filedes, buffer.address(), valueAddress, valueLen); in fgetxattr() 75 buffer.release(); in fgetxattr() 88 NativeBuffer buffer = NativeBuffers.asNativeBuffer(name); in fsetxattr() local 90 fsetxattr0(filedes, buffer.address(), valueAddress, valueLen); in fsetxattr() 92 buffer.release(); in fsetxattr() 103 NativeBuffer buffer = NativeBuffers.asNativeBuffer(name); in fremovexattr() local 105 fremovexattr0(filedes, buffer.address()); in fremovexattr() 107 buffer.release(); in fremovexattr()
|
D | LinuxUserDefinedFileAttributeView.java | 106 NativeBuffer buffer = null; in list() local 109 buffer = NativeBuffers.getNativeBuffer(size); in list() 112 int n = flistxattr(fd, buffer.address(), size); in list() 113 List<String> list = asList(buffer.address(), n); in list() 118 buffer.release(); in list() 120 buffer = null; in list() 121 buffer = NativeBuffers.getNativeBuffer(size); in list() 130 if (buffer != null) in list() 131 buffer.release(); in list() 300 NativeBuffer buffer = null; in copyExtendedAttributes() local [all …]
|
/libcore/luni/src/main/java/libcore/io/ |
D | Streams.java | 40 byte[] buffer = new byte[1]; in readSingleByte() 41 int result = in.read(buffer, 0, 1); in readSingleByte() 42 return (result != -1) ? buffer[0] & 0xff : -1; in readSingleByte() 51 byte[] buffer = new byte[1]; in writeSingleByte() 52 buffer[0] = (byte) (b & 0xff); in writeSingleByte() 53 out.write(buffer); in writeSingleByte() 106 byte[] buffer = new byte[1024]; in readFullyNoClose() 108 while ((count = in.read(buffer)) != -1) { in readFullyNoClose() 109 bytes.write(buffer, 0, count); in readFullyNoClose() 120 char[] buffer = new char[1024]; in readFully() local [all …]
|
D | Linux.java | 133 …public int pread(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, Interru… in pread() argument 135 final int position = buffer.position(); in pread() 137 if (buffer.isDirect()) { in pread() 138 bytesRead = preadBytes(fd, buffer, position, buffer.remaining(), offset); in pread() 140 …esRead = preadBytes(fd, NioUtils.unsafeArray(buffer), NioUtils.unsafeArrayOffset(buffer) + positio… in pread() 143 maybeUpdateBufferPosition(buffer, position, bytesRead); in pread() 150 …private native int preadBytes(FileDescriptor fd, Object buffer, int bufferOffset, int byteCount, l… in preadBytes() argument 151 …public int pwrite(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, Interr… in pwrite() argument 153 final int position = buffer.position(); in pwrite() 155 if (buffer.isDirect()) { in pwrite() [all …]
|
/libcore/luni/src/main/java/javax/xml/transform/stream/ |
D | FilePathToURI.java | 64 StringBuilder buffer = new StringBuilder(len*3); in filepath2URI() local 65 buffer.append("file://"); in filepath2URI() 70 buffer.append('/'); in filepath2URI() 82 buffer.append('%'); in filepath2URI() 83 buffer.append(gAfterEscaping1[ch]); in filepath2URI() 84 buffer.append(gAfterEscaping2[ch]); in filepath2URI() 88 buffer.append((char)ch); in filepath2URI() 111 buffer.append('%'); in filepath2URI() 112 buffer.append(gHexChs[ch >> 4]); in filepath2URI() 113 buffer.append(gHexChs[ch & 0xf]); in filepath2URI() [all …]
|
/libcore/luni/src/main/java/javax/xml/parsers/ |
D | FilePathToURI.java | 64 StringBuilder buffer = new StringBuilder(len*3); in filepath2URI() local 65 buffer.append("file://"); in filepath2URI() 70 buffer.append('/'); in filepath2URI() 82 buffer.append('%'); in filepath2URI() 83 buffer.append(gAfterEscaping1[ch]); in filepath2URI() 84 buffer.append(gAfterEscaping2[ch]); in filepath2URI() 88 buffer.append((char)ch); in filepath2URI() 111 buffer.append('%'); in filepath2URI() 112 buffer.append(gHexChs[ch >> 4]); in filepath2URI() 113 buffer.append(gHexChs[ch & 0xf]); in filepath2URI() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | StringBufferTest.java | 33 StringBuffer buffer = new StringBuffer("abcde"); in test_setLengthI() local 35 buffer.setLength(-1); in test_setLengthI() 41 assertEquals("abcde", buffer.toString()); in test_setLengthI() 42 buffer.setLength(1); in test_setLengthI() 43 buffer.append('f'); in test_setLengthI() 44 assertEquals("af", buffer.toString()); in test_setLengthI() 46 buffer = new StringBuffer("abcde"); in test_setLengthI() 47 assertEquals("cde", buffer.substring(2)); in test_setLengthI() 48 buffer.setLength(3); in test_setLengthI() 49 buffer.append('f'); in test_setLengthI() [all …]
|
/libcore/ojluni/src/main/java/java/nio/ |
D | CharBufferSpliterator.java | 40 private final CharBuffer buffer; field in CharBufferSpliterator 44 CharBufferSpliterator(CharBuffer buffer) { in CharBufferSpliterator() argument 45 this(buffer, buffer.position(), buffer.limit()); in CharBufferSpliterator() 48 CharBufferSpliterator(CharBuffer buffer, int origin, int limit) { in CharBufferSpliterator() argument 50 this.buffer = buffer; in CharBufferSpliterator() 60 : new CharBufferSpliterator(buffer, lo, index = mid); in trySplit() 67 CharBuffer cb = buffer; in forEachRemaining() 81 action.accept(buffer.getUnchecked(index++)); in tryAdvance()
|
/libcore/support/src/test/java/tests/support/ |
D | Support_OutputStream.java | 17 private byte[] buffer; field in Support_OutputStream 35 buffer = new byte[bufferSize]; in Support_OutputStream() 58 public void write(byte buffer[]) throws IOException { in write() argument 62 for (int i = 0; i < buffer.length; i++) { in write() 63 write(buffer[i]); in write() 68 public void write(byte buffer[], int offset, int count) throws IOException { in write() argument 72 if (offset < 0 || count < 0 || (offset + count) > buffer.length) { in write() 76 write(buffer[i]); in write() 86 buffer[position] = (byte)(oneByte & 255); in write() 95 System.arraycopy(buffer, 0, toReturn, 0, position); in toByteArray() [all …]
|
D | Streams.java | 37 byte[] buffer = new byte[1024]; in streamToBytes() 40 while ((count = source.read(buffer)) != -1) { in streamToBytes() 41 out.write(buffer, 0, count); in streamToBytes() 50 char[] buffer = new char[1024]; in streamToString() local 53 while ((count = fileReader.read(buffer)) != -1) { in streamToString() 54 out.write(buffer, 0, count); in streamToString()
|
/libcore/ojluni/src/main/java/java/util/zip/ |
D | Adler32.java | 104 public void update(ByteBuffer buffer) { in update() argument 105 int pos = buffer.position(); in update() 106 int limit = buffer.limit(); in update() 111 if (buffer instanceof DirectBuffer) { in update() 112 adler = updateByteBuffer(adler, ((DirectBuffer)buffer).address(), pos, rem); in update() 113 } else if (buffer.hasArray()) { in update() 114 adler = updateBytes(adler, buffer.array(), pos + buffer.arrayOffset(), rem); in update() 117 buffer.get(b); in update() 120 buffer.position(limit); in update()
|
D | CRC32.java | 101 public void update(ByteBuffer buffer) { in update() argument 102 int pos = buffer.position(); in update() 103 int limit = buffer.limit(); in update() 108 if (buffer instanceof DirectBuffer) { in update() 109 crc = updateByteBuffer(crc, ((DirectBuffer)buffer).address(), pos, rem); in update() 110 } else if (buffer.hasArray()) { in update() 111 crc = updateBytes(crc, buffer.array(), pos + buffer.arrayOffset(), rem); in update() 114 buffer.get(b); in update() 117 buffer.position(limit); in update()
|
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/ |
D | CharacterDataImpl.java | 35 protected StringBuffer buffer; field in CharacterDataImpl 43 buffer.append(arg); in appendData() 47 buffer.delete(offset, offset + count); in deleteData() 51 return buffer.toString(); in getData() 58 stringBuilder.append(buffer); in appendDataTo() 62 return buffer.length(); in getLength() 72 buffer.insert(offset, arg); in insertData() 81 buffer.replace(offset, offset + count, arg); in replaceData() 88 buffer = new StringBuffer(data); in setData() 93 return buffer.substring(offset, offset + count); in substringData()
|
/libcore/ojluni/src/main/java/java/io/ |
D | BufferedInputStream.java | 170 byte[] buffer = buf; in getBufIfOpen() 171 if (buffer == null) in getBufIfOpen() 173 return buffer; in getBufIfOpen() 216 byte[] buffer = getBufIfOpen(); in fill() 219 else if (pos >= buffer.length) /* no room left in buffer */ in fill() 222 System.arraycopy(buffer, markpos, buffer, 0, sz); in fill() 225 } else if (buffer.length >= marklimit) { in fill() 228 } else if (buffer.length >= MAX_BUFFER_SIZE) { in fill() 236 System.arraycopy(buffer, 0, nbuf, 0, pos); in fill() 237 if (!bufUpdater.compareAndSet(this, buffer, nbuf)) { in fill() [all …]
|
D | PipedInputStream.java | 80 protected byte buffer[]; field in PipedInputStream 164 buffer = new byte[pipeSize]; in initPipe() 212 buffer[in++] = (byte)(b & 0xFF); in receive() 213 if (in >= buffer.length) { in receive() 237 nextTransferAmount = buffer.length - in; in receive() 241 nextTransferAmount = buffer.length - in; in receive() 249 System.arraycopy(b, off, buffer, in, nextTransferAmount); in receive() 253 if (in >= buffer.length) { in receive() 338 int ret = buffer[out++] & 0xFF; in read() 339 if (out >= buffer.length) { in read() [all …]
|
/libcore/ojluni/src/main/java/sun/security/pkcs/ |
D | SigningCertificateInfo.java | 95 StringBuffer buffer = new StringBuffer(); in toString() local 96 buffer.append("[\n"); in toString() 98 buffer.append(certId[i].toString()); in toString() 101 buffer.append("\n]"); in toString() 103 return buffer.toString(); in toString() 154 StringBuffer buffer = new StringBuffer(); in toString() local 155 buffer.append("[\n\tCertificate hash (SHA-1):\n"); in toString() 159 buffer.append(hexDumper.encode(certHash)); in toString() 161 buffer.append("\n\tIssuer: " + issuer + "\n"); in toString() 162 buffer.append("\t" + serialNumber); in toString() [all …]
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | OldOutputStreamTest.java | 28 private byte[] buffer; field in OldOutputStreamTest.BasicOutputStream 32 buffer = new byte[BUFFER_SIZE]; in BasicOutputStream() 38 buffer[position] = (byte) (oneByte & 255); in write() 46 return buffer; in getBuffer() 56 byte[] buffer; in test_write$B() 65 buffer = bos.getBuffer(); in test_write$B() 67 expected = (shortByteArray[i] == buffer[i]); in test_write$B() 81 byte[] buffer; in test_write$BII() 90 buffer = bos.getBuffer(); in test_write$BII() 92 expected = (shortByteArray[i] == buffer[j]); in test_write$BII()
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
D | DeflaterInputStreamTest.java | 60 byte[] buffer = new byte[1024]; in inflate() 62 while ((count = in.read(buffer)) != -1) { in inflate() 63 out.write(buffer, 0, count); in inflate() 71 byte[] buffer = new byte[8]; in testReadWithBuffer() 76 while ((count = in.read(buffer, 0, 5)) != -1) { in testReadWithBuffer() 78 out.write(buffer, 0, count); in testReadWithBuffer() 94 byte[] buffer = new byte[8]; in testReadExceptions() 97 in.read(buffer, 0, 10); in testReadExceptions() 107 in.read(buffer, -1, 5); in testReadExceptions() 113 in.read(buffer, 0, 5); in testReadExceptions()
|
/libcore/xml/src/main/java/org/kxml2/io/ |
D | KXmlParser.java | 142 private char[] buffer = new char[8192]; field in KXmlParser 482 result.append(buffer, start, position - start); in readUntil() 495 if (buffer[position + i] != delimiter[i]) { in readUntil() 510 return stringPool.get(buffer, start, end - start); in readUntil() 512 result.append(buffer, start, end - start); in readUntil() 599 bufferCapture.append(buffer, 0, position); in readDoctype() 823 if (buffer[position] == NOTATION[0] && buffer[position + 1] == NOTATION[1]) { in readAttributeListDeclaration() 997 switch (buffer[position]) { in peekType() 1005 switch (buffer[position + 1]) { in peekType() 1011 && (buffer[position + 2] == 'x' || buffer[position + 2] == 'X') in peekType() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
D | ASCCharsetDecoderTest.java | 58 ByteBuffer buffer = ByteBuffer.allocate(8); in getMalformedByteBuffer() local 59 buffer.put((byte) -1); in getMalformedByteBuffer() 60 buffer.put(getByteBuffer()); in getMalformedByteBuffer() 61 buffer.flip(); in getMalformedByteBuffer() 62 return buffer; in getMalformedByteBuffer()
|
D | GBCharsetDecoderTest.java | 53 ByteBuffer buffer = ByteBuffer.allocate(20); in getMalformedByteBuffer() local 54 buffer.put(new byte[] { (byte) 0xd8 }); in getMalformedByteBuffer() 55 buffer.put(getByteBuffer()); in getMalformedByteBuffer() 56 buffer.flip(); in getMalformedByteBuffer() 57 return buffer; in getMalformedByteBuffer()
|