/libcore/luni/src/test/java/libcore/java/io/ |
H A D | OldBufferedReaderTest.java | 84 char[] buf = null; 91 buf = new char[testString.length()]; 92 br.read(buf, 0, 500); 94 1000).equals(new String(buf, 0, 500))); 102 br.read(buf, 0, 1000); 164 char[] buf = new char[14]; 165 in.read(buf, 0, 14); // Read greater than the buffer 166 assertTrue("Wrong block read data", new String(buf) 275 char[] buf = new char[testString.length()]; 276 br.read(buf, [all...] |
H A D | OldInputStreamReaderTest.java | 53 char[] buf = new char[fileString.length()]; 54 fileString.getChars(0, fileString.length(), buf, 0); 55 osw.write(buf); 150 char[] buf = new char[8191]; 151 int bytesRead = isr.read(buf, 0, buf.length); 155 bytesRead = isr.read(buf, 0, buf.length);
|
H A D | OldPushbackReaderTest.java | 40 char buf[] = new char[5]; 41 pbr.read(buf, 0, 5); 42 pbr.unread(buf); 129 char[] buf = ("01234567890123456789").toCharArray(); 132 tobj.read(buf, 6, 5); 133 assertEquals("Wrong value read!", "BEGIN", new String(buf, 6, 5)); 134 assertEquals("Too much read!", "012345BEGIN123456789", new String(buf)); 137 tobj.read(buf, 6, 5);
|
H A D | OldByteArrayInputStreamTest.java | 64 public static byte[] buf; field in class:OldByteArrayInputStreamTest.SubByteArrayInputStream 68 SubByteArrayInputStream(byte[] buf, int offset, int length) argument 70 super(buf, offset, length); 71 buf = super.buf;
|
H A D | OldFilterOutputStreamTest.java | 147 byte[] buf = new byte[10]; 150 os.write(buf, -1, 1); 157 os.write(buf, 0, -1); 164 os.write(buf, 10, 1);
|
/libcore/ojluni/src/main/java/java/util/ |
H A D | Scanner.java | 350 private CharBuffer buf; field in class:Scanner 583 buf = CharBuffer.allocate(BUFFER_SIZE); 584 buf.limit(0); 585 matcher = delimPattern.matcher(buf); 803 if (buf.limit() == buf.capacity()) 807 int p = buf.position(); 808 buf.position(buf.limit()); 809 buf [all...] |
/libcore/ojluni/src/main/java/sun/util/locale/ |
H A D | LocaleExtensions.java | 195 StringBuilder buf = new StringBuilder(); 203 if (buf.length() > 0) { 204 buf.append(LanguageTag.SEP); 206 buf.append(extension); 210 if (buf.length() > 0) { 211 buf.append(LanguageTag.SEP); 213 buf.append(privuse); 215 return buf.toString();
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
H A D | SinkChannelTest.java | 82 for (ByteBuffer buf : bufArray) { 83 buf.mark(); 84 oldPosition = buf.position(); 85 sink.write(buf); 94 currentPosition = buf.position(); 97 buf.reset(); 138 StringBuffer buf = new StringBuffer(); 140 buf.append("bytes"); 142 String readString = buf.toString(); 469 ByteBuffer buf [all...] |
H A D | ServerSocketChannelTest.java | 406 ByteBuffer buf = ByteBuffer.allocate(CAPACITY_NORMAL); 409 buf.put((byte) i); 414 buf.flip(); 415 clientChannel.write(buf); 445 ByteBuffer buf = ByteBuffer.allocate(CAPACITY_NORMAL); 447 buf.put((byte) i); 449 buf.flip(); 453 clientChannel.write(buf); 505 ByteBuffer buf = ByteBuffer.allocate(CAPACITY_64KB); 507 buf [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/ |
H A D | DeflaterInputStreamTest.java | 58 byte[] buf = new byte[1024]; 63 assertEquals(22, dis.read(buf, 0, 1024)); 80 byte[] buf = new byte[1024]; 91 dis.read(buf, 0, 1024); 167 // protected field buf is a part of the public API of this class. 170 byte[] buf = dis.getBuffer(); 174 System.arraycopy(buf, 0, splicedBuf, 0, splicedBuf.length); 302 byte[] buf = new byte[1024]; 307 assertEquals(22, dis.read(buf, 0, 1024)); 315 assertEquals(-1, dis.read(buf, [all...] |
/libcore/ojluni/src/main/java/sun/security/util/ |
H A D | DerOutputStream.java | 75 * @param buf buffered data, which must be DER-encoded 77 public void write(byte tag, byte[] buf) throws IOException { argument 79 putLength(buf.length); 80 write(buf, 0, buf.length); 95 write(out.buf, 0, out.count); 118 write(value.buf, 1, value.count-1); 165 byte[] buf = i.toByteArray(); // least number of bytes 166 putLength(buf.length); 167 write(buf, [all...] |
/libcore/ojluni/src/main/native/ |
H A D | zip_util.c | 145 ZFILE_read(ZFILE zfd, char *buf, jint nbytes, jlong offset) { argument 147 return (int) IO_Read(zfd, buf, nbytes); 157 return pread(zfd, buf, nbytes, offset); 186 * Reads len bytes of data from the specified offset into buf. 190 readFullyAt(ZFILE zfd, void *buf, jlong len, jlong offset) { argument 191 char *bp = (char *) buf; 278 char buf[4]; local 281 readFullyAt(zip->zfd, buf, sizeof(buf), cenpos) != -1 && 282 GETSIG(buf) 296 char buf[READBLOCKSZ]; local 794 char buf[PATH_MAX]; local 1321 ZIP_Read(jzfile *zip, jzentry *entry, jlong pos, void *buf, jint len) argument 1374 InflateFully(jzfile *zip, jzentry *entry, void *buf, char **msg) argument 1455 ZIP_ReadEntry(jzfile *zip, jzentry *entry, unsigned char *buf, char *entryname) argument [all...] |
H A D | java_props_md.c | 336 char buf[MAXPATHLEN]; local 343 realpath((char *)dlinfo.dli_fname, buf); 344 len = strlen(buf); 345 p = strrchr(buf, '/'); 349 if (stat(buf, &statbuf) == -1 && errno == ENOENT) { 546 char buf[MAXPATHLEN]; local 548 if (getcwd(buf, sizeof(buf)) == NULL) 552 sprops.user_dir = strdup(buf);
|
H A D | DatagramDispatcher.c | 55 void *buf = (void *)jlong_to_ptr(address); local 56 int result = recv(fd, buf, len, 0); 102 void *buf = (void *)jlong_to_ptr(address); local 103 int result = send(fd, buf, len, 0);
|
H A D | IOUtil.c | 111 char buf[128]; local 115 int n = read(fd, buf, sizeof(buf)); 119 if (n == (int)sizeof(buf))
|
H A D | linux_close.cpp | 124 int NET_Read(int s, void* buf, size_t len) { argument 125 BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) ); 132 int NET_RecvFrom(int s, void *buf, int len, unsigned int flags, argument 135 BLOCKING_IO_RETURN_INT( s, recvfrom(s, buf, len, flags, from, &socklen) );
|
/libcore/ojluni/src/main/java/java/io/ |
H A D | ObjectInputStream.java | 850 * @param buf the buffer into which the data is read 858 public int read(byte[] buf, int off, int len) throws IOException { argument 859 if (buf == null) { 863 if (off < 0 || len < 0 || endoff > buf.length || endoff < 0) { 866 return bin.read(buf, off, len, false); 1011 * @param buf the buffer into which the data is read 1015 public void readFully(byte[] buf) throws IOException { argument 1016 bin.readFully(buf, 0, buf.length, false); 1022 * @param buf th 1028 readFully(byte[] buf, int off, int len) argument 2380 private final byte[] buf = new byte[MAX_BLOCK_SIZE]; field in class:ObjectInputStream.BlockDataInputStream [all...] |
H A D | ObjectOutputStream.java | 698 * @param buf the data to be written 701 public void write(byte[] buf) throws IOException { argument 702 bout.write(buf, 0, buf.length, false); 708 * @param buf the data to be written 713 public void write(byte[] buf, int off, int len) throws IOException { argument 714 if (buf == null) { 718 if (off < 0 || len < 0 || endoff > buf.length || endoff < 0) { 721 bout.write(buf, off, len, false); 1786 private final byte[] buf field in class:ObjectOutputStream.BlockDataOutputStream [all...] |
H A D | BufferedInputStream.java | 60 protected volatile byte buf[]; field in class:BufferedInputStream 63 * Atomic updater to provide compareAndSet for buf. This is 65 * of buf[] as primary indicator that this stream is closed. (The 71 (BufferedInputStream.class, byte[].class, "buf"); 77 * in the range <code>0</code> through <code>buf.length</code>; 78 * elements <code>buf[0]</code> through <code>buf[count-1] 86 * character to be read from the <code>buf</code> array. 90 * than <code>count</code>, then <code>buf[pos]</code> 97 * @see java.io.BufferedInputStream#buf [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
H A D | StringBuffer2Test.java | 69 char buf[] = new char[4]; 70 "char".getChars(0, 4, buf, 0); 71 testBuffer.append(buf); 304 char[] buf = new char[10]; 305 testBuffer.getChars(4, 8, buf, 2); 306 assertTrue("Returned incorrect chars", new String(buf, 2, 4) 325 char buf[] = new char[4]; 326 "char".getChars(0, 4, buf, 0); 327 testBuffer.insert(15, buf);
|
/libcore/luni/src/test/java/libcore/java/text/ |
H A D | OldAttributedStringTest.java | 32 StringBuffer buf = new StringBuffer(); 33 buf.append(it.first()); 36 buf.append(ch); 37 assertEquals(msg, expected, buf.toString()); 172 StringBuffer buf = new StringBuffer(); 173 buf.append(it.first()); 176 buf.append(ch); 177 assertTrue("Wrong string: " + buf, buf.toString().equals(test));
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
H A D | OldAndroidZipStreamTest.java | 146 byte[] buf = new byte[4096]; 149 while ((len = in.read(buf)) > 0) { 150 contents.write(buf, 0, len);
|
/libcore/ojluni/src/main/java/sun/net/www/http/ |
H A D | KeepAliveStream.java | 141 byte[] buf = new byte[size]; 143 dis.readFully(buf); 144 in = new ByteArrayInputStream(buf);
|
/libcore/luni/src/main/native/ |
H A D | ZipUtilities.h | 37 void setInput(JNIEnv* env, jbyteArray buf, jint off, jint len);
|
/libcore/ojluni/src/main/java/sun/net/www/protocol/file/ |
H A D | FileURLConnection.java | 194 StringBuffer buf = new StringBuffer(); 204 buf.append(fileName); 205 buf.append("\n"); 208 is = new ByteArrayInputStream(buf.toString().getBytes());
|