/libcore/luni/src/test/java/libcore/java/nio/ |
H A D | NoArrayTest.java | 31 private void assertNoArray(ByteBuffer buf) { argument 32 assertFalse(buf.hasArray()); 34 buf.array(); 40 buf.arrayOffset();
|
/libcore/luni/src/main/native/ |
H A D | JniException.cpp | 23 char buf[BUFSIZ]; local 24 jniThrowException(env, exceptionClassName, jniStrError(error, buf, sizeof(buf)));
|
/libcore/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/ |
H A D | Chunk.java | 56 public Chunk(int type, ByteBuffer buf) { argument 59 this.data = buf.array(); 60 this.offset = buf.arrayOffset(); 61 this.length = buf.position();
|
/libcore/luni/src/main/java/java/io/ |
H A D | BufferedOutputStream.java | 33 * BufferedOutputStream buf = new BufferedOutputStream(new FileOutputStream("file.java")); 42 protected byte[] buf; field in class:BufferedOutputStream 45 * The total number of bytes inside the byte array {@code buf}. 72 buf = new byte[size]; 90 if (buf == null) { 128 byte[] internalBuffer = buf; 147 if (buf == null) { 154 buf = null; 173 if (count == buf.length) { 174 out.write(buf, [all...] |
H A D | BufferedWriter.java | 34 * BufferedWriter buf = new BufferedWriter(new FileWriter("file.java")); 43 private char[] buf; field in class:BufferedWriter 71 this.buf = new char[size]; 95 buf = null; 139 out.write(buf, 0, pos); 191 if (pos == 0 && count >= this.buf.length) { 195 int available = this.buf.length - pos; 200 System.arraycopy(buffer, offset, this.buf, pos, available); 203 if (pos == this.buf.length) { 204 out.write(this.buf, [all...] |
H A D | ByteArrayInputStream.java | 31 protected byte[] buf; field in class:ByteArrayInputStream 46 * {@code buf}. 52 * {@code buf}. 54 * @param buf 57 public ByteArrayInputStream(byte[] buf) { argument 59 this.buf = buf; 60 this.count = buf.length; 65 * {@code buf} with the initial position set to {@code offset} and the 68 * @param buf 75 ByteArrayInputStream(byte[] buf, int offset, int length) argument [all...] |
H A D | StringWriter.java | 32 private StringBuffer buf; field in class:StringWriter 41 buf = new StringBuffer(16); 42 lock = buf; 58 buf = new StringBuffer(initialSize); 59 lock = buf; 90 return buf; 100 return buf.toString(); 104 * Writes {@code count} characters starting at {@code offset} in {@code buf} 115 * offset + count} is greater than the size of {@code buf}. 123 buf [all...] |
H A D | Writer.java | 86 * Writes the entire character buffer {@code buf} to the target. 88 * @param buf 93 public void write(char[] buf) throws IOException { argument 94 write(buf, 0, buf.length); 98 * Writes {@code count} characters starting at {@code offset} in {@code buf} 101 * @param buf 104 * the index of the first character in {@code buf} to write. 109 * offset + count} is greater than the size of {@code buf}. 113 public abstract void write(char[] buf, in argument [all...] |
/libcore/luni/src/main/java/java/security/ |
H A D | MessageDigestSpi.java | 106 * @param buf 109 * the index of the first byte in {@code buf} to store in. 112 * @return the number of bytes written to {@code buf}. 117 * {@code buf}. 120 protected int engineDigest(byte[] buf, int offset, int len) throws DigestException { argument 129 if (offset + len > buf.length) { 131 throw new DigestException("offset + len > buf.length"); 137 System.arraycopy(tmp, 0, buf, offset, tmp.length);
|
/libcore/luni/src/main/java/java/util/zip/ |
H A D | Adler32.java | 59 * Update this {@code Adler32} checksum using the contents of {@code buf}. 61 * @param buf 64 public void update(byte[] buf) { argument 65 update(buf, 0, buf.length); 69 * Update this {@code Adler32} checksum with the contents of {@code buf}, 72 public void update(byte[] buf, int offset, int byteCount) { argument 73 Arrays.checkOffsetAndCount(buf.length, offset, byteCount); 74 adler = updateImpl(buf, offset, byteCount, adler); 77 private native long updateImpl(byte[] buf, in argument [all...] |
H A D | CRC32.java | 60 * Updates this checksum with the bytes contained in buffer {@code buf}. 62 * @param buf 65 public void update(byte[] buf) { argument 66 update(buf, 0, buf.length); 70 * Update this {@code CRC32} checksum with the contents of {@code buf}, 73 public void update(byte[] buf, int offset, int byteCount) { argument 74 Arrays.checkOffsetAndCount(buf.length, offset, byteCount); 76 crc = updateImpl(buf, offset, byteCount, crc); 79 private native long updateImpl(byte[] buf, in argument [all...] |
H A D | CheckedOutputStream.java | 73 * Writes n bytes of data from {@code buf} starting at offset {@code off} to 76 * @param buf 79 * the offset to start reading the data from {@code buf} written 87 public void write(byte[] buf, int off, int nbytes) throws IOException { argument 88 out.write(buf, off, nbytes); 89 check.update(buf, off, nbytes);
|
H A D | Checksum.java | 41 * @param buf 44 * the initial position in {@code buf} to read the bytes from. 46 * the number of bytes to read from {@code buf}. 48 public void update(byte[] buf, int off, int nbytes); argument
|
H A D | DeflaterOutputStream.java | 39 protected byte[] buf; field in class:DeflaterOutputStream 105 buf = new byte[bufferSize]; 117 while ((byteCount = def.deflate(buf)) != 0) { 118 out.write(buf, 0, byteCount); 154 int byteCount = def.deflate(buf); 155 out.write(buf, 0, byteCount); 165 * Compresses {@code byteCount} bytes of data from {@code buf} starting at 193 while ((byteCount = def.deflate(buf, 0, buf.length, Deflater.SYNC_FLUSH)) != 0) { 194 out.write(buf, [all...] |
H A D | InflaterOutputStream.java | 35 protected final byte[] buf; field in class:InflaterOutputStream 82 this.buf = new byte[bufferSize]; 151 while ((inflated = inf.inflate(buf)) > 0) { 152 out.write(buf, 0, inflated);
|
/libcore/luni/src/main/java/libcore/io/ |
H A D | StrictLineReader.java | 53 * Buffered data is stored in {@code buf}. As long as no exception occurs, 0 <= pos <= end 58 private byte[] buf; field in class:StrictLineReader 124 buf = new byte[capacity]; 136 if (buf != null) { 137 buf = null; 153 if (buf == null) { 165 if (buf[i] == LF) { 166 int lineEnd = (i != pos && buf[i - 1] == CR) ? i - 1 : i; 167 String res = new String(buf, pos, lineEnd - pos, charset); 177 int length = (count > 0 && buf[coun [all...] |
/libcore/support/src/test/java/tests/support/ |
H A D | Support_ASimpleInputStream.java | 16 public byte[] buf; field in class:Support_ASimpleInputStream 35 buf = input.getBytes(); 37 len = buf.length; 43 buf = new byte[len]; 44 System.arraycopy(input, 0, buf, 0, len); 68 int res = buf[pos];
|
H A D | Support_ASimpleOutputStream.java | 16 public byte[] buf; field in class:Support_ASimpleOutputStream 35 buf = new byte[bufferSize]; 83 buf[pos] = (byte)(oneByte & 255); 92 System.arraycopy(buf, 0, toReturn, 0, pos); 97 return new String(buf, 0, pos);
|
H A D | Support_ASimpleReader.java | 16 public char[] buf; field in class:Support_ASimpleReader 35 buf = input.toCharArray(); 37 len = buf.length; 63 System.arraycopy(buf, pos, dest, offset, readable);
|
H A D | Support_StringWriter.java | 24 private StringBuffer buf; field in class:Support_StringWriter 33 buf = new StringBuffer(16); 34 lock = buf; 44 buf = new StringBuffer(initialSize); 45 lock = buf; 80 return buf; 94 return buf.toString(); 100 * in <code>buf</code> to this StringWriter. 102 * @param buf 105 * offset in buf t 113 write(char[] buf, int offset, int count) argument [all...] |
H A D | ThrowingReader.java | 45 @Override public int read(char[] buf, int offset, int count) argument 53 int returned = super.read(buf, offset, count);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/luni/tests/java/util/ |
H A D | ScannerParseLargeFileBenchmarkTest.java | 58 public int read(char[] buf, int offset, int length) { argument 67 buf[i] = CONTENT[(i + position) % CONTENT.length];
|
/libcore/luni/src/main/java/java/util/ |
H A D | Random.java | 102 * Fills {@code buf} with random bytes. 104 public void nextBytes(byte[] buf) { argument 106 while (count < buf.length) { 113 buf[count++] = (byte) rand;
|
/libcore/luni/src/main/java/java/util/jar/ |
H A D | ManifestReader.java | 37 private final byte[] buf; field in class:ManifestReader 49 public ManifestReader(byte[] buf, Attributes main) throws IOException { argument 50 this.buf = buf; 116 while (pos < buf.length) { 117 if (buf[pos++] != ':') { 121 String nameString = new String(buf, mark, pos - mark - 1, StandardCharsets.US_ASCII); 123 if (buf[pos++] != ' ') { 146 while (pos < buf.length) { 147 byte next = buf[po [all...] |
/libcore/luni/src/main/java/libcore/net/url/ |
H A D | FtpURLInputStream.java | 46 public int read(byte[] buf, int off, int nbytes) throws IOException { argument 47 return is.read(buf, off, nbytes);
|