Searched refs:buf (Results 226 - 250 of 251) sorted by relevance

1234567891011

/libcore/luni/src/main/java/java/nio/
H A DByteArrayBuffer.java52 ByteArrayBuffer buf = new ByteArrayBuffer(other.capacity(), other.backingArray, other.arrayOffset, isReadOnly);
53 buf.limit = other.limit;
54 buf.position = other.position();
55 buf.mark = markOfOther;
56 return buf;
H A DDirectByteBuffer.java54 DirectByteBuffer buf = new DirectByteBuffer(other.block, other.capacity(), other.offset, isReadOnly, other.mapMode);
55 buf.limit = other.limit;
56 buf.position = other.position();
57 buf.mark = markOfOther;
58 return buf;
H A DDatagramChannelImpl.java451 private int writeImpl(ByteBuffer buf) throws IOException { argument
456 result = IoBridge.sendto(fd, buf, 0, null, 0);
/libcore/luni/src/test/java/libcore/java/io/
H A DOldOutputStreamWriterTest.java248 char[] buf = new char[testString.length()];
252 isr.read(buf, 0, buf.length);
254 new String(buf, 0, buf.length).equals(testString));
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/net/
H A DURLConnectionTest.java353 String buf = null;
357 buf = (String) obj;
358 assertTrue("Incorrect content returned from fileURL: "+buf,
359 testString.equals(buf.trim()));
363 buf = r.readLine();
364 assertTrue("Incorrect content returned from fileURL: "+buf,
365 testString.equals(buf.trim()));
1244 BufferedReader buf = new BufferedReader(new InputStreamReader(
1248 while ((nextline = buf.readLine()) != null) {
1252 buf
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
H A DJarURLConnectionTest.java254 byte[] buf = new byte[80];
255 while (is.read(buf) > 0) ;
262 while (is.read(buf) > 0) ;
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DBufferedWriterTest.java57 public void write(char[] buf, int off, int len) throws IOException { argument
59 sb.append(buf[i]);
/libcore/luni/src/test/java/libcore/java/security/cert/
H A DX509CRLTest.java112 byte[] buf = new byte[ris.available()];
113 dis.readFully(buf);
114 return buf;
130 final BufferedReader buf = new BufferedReader(new InputStreamReader(ris));
133 while ((line = buf.readLine()) != null) {
H A DX509CertificateTest.java176 final BufferedReader buf = new BufferedReader(new InputStreamReader(ris));
177 String line = buf.readLine();
182 line = buf.readLine();
202 final BufferedReader buf = new BufferedReader(new InputStreamReader(ris));
204 String line = buf.readLine();
221 byte[] buf = new byte[ris.available()];
222 dis.readFully(buf);
223 return buf;
/libcore/luni/src/test/java/libcore/java/lang/
H A DOldStringTest.java37 char[] buf = { 'W', 'o', 'r', 'l', 'd' }; field in class:OldStringTest
365 "World", String.valueOf(buf));
/libcore/luni/src/main/native/
H A Dlibcore_io_Posix.cpp354 static jobject makeStructUtsname(JNIEnv* env, const struct utsname& buf) { argument
355 TO_JAVA_STRING(sysname, buf.sysname);
356 TO_JAVA_STRING(nodename, buf.nodename);
357 TO_JAVA_STRING(release, buf.release);
358 TO_JAVA_STRING(version, buf.version);
359 TO_JAVA_STRING(machine, buf.machine);
759 char buf[NI_MAXHOST]; // NI_MAXHOST is longer than INET6_ADDRSTRLEN. local
761 int rc = getnameinfo(reinterpret_cast<sockaddr*>(&ss), sa_len, buf, sizeof(buf), NULL, 0, flags);
766 return env->NewStringUTF(buf);
887 char buf[IF_NAMESIZE]; local
1498 struct utsname buf; local
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
H A DStringTest.java144 char[] buf = { 'H', 'e', 'l', 'l', 'o', 'W', 'o', 'r', 'l', 'd' };
145 String s = new String(buf, 0, buf.length);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/jar/
H A DJarFileTest.java50 byte[] buf = new byte[666];
54 iRead = is.read(buf, 0, buf.length);
55 if (iRead > 0) bs.write(buf, 0, iRead);
/libcore/jsr166-tests/src/test/java/jsr166/
H A DRecursiveActionTest.java1217 long[] buf = Arrays.copyOfRange(array, lo, mid);
1218 for (int i = 0, j = lo, k = mid; i < buf.length; j++)
1219 array[j] = (k == hi || buf[i] < array[k]) ?
1220 buf[i++] : array[k++];
/libcore/luni/src/main/java/java/net/
H A DURLClassLoader.java464 StringBuilder buf = new StringBuilder(2 + hostLength
467 buf.append("//").append(host);
470 buf.append(baseFile);
471 prefix = buf.toString();
/libcore/luni/src/test/java/libcore/xml/
H A DXmlPullParserFactoryTest.java202 public XmlSerializer text(char[] buf, int start, int len) throws IOException { argument
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/
H A DMacTest.java302 byte [] buf = new byte[10];
303 ByteBuffer bBuf = ByteBuffer.wrap(buf, 0, 10);
313 macs[i].update(buf);
318 macs[i].update(buf, 0, 3);
/libcore/luni/src/test/java/libcore/java/nio/
H A DBufferTest.java527 byte[] buf = new byte[5];
529 b.get(buf);
533 b.get(buf, 1, 3);
566 b.put(buf);
570 b.put(buf, 1, 3);
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/
H A DNodeImpl.java397 void getTextContent(StringBuilder buf) throws DOMException { argument
400 buf.append(content);
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/https/
H A DHttpsURLConnectionTest.java673 byte[] buf = new byte[128];
674 int read = bufIn.read(buf);
675 out.write(buf, 0, read);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
H A DDecimalFormatTest.java743 StringBuffer buf = new StringBuffer();
745 format.format(new Long(1970), buf, new FieldPosition(0));
746 assertEquals("1970", buf.toString());
748 format.format(new Long(1970), buf, new FieldPosition(0));
749 assertEquals("19701970", buf.toString());
753 format.format(new Long(1970), buf, new FieldPosition(0));
754 assertEquals("197019701,970", buf.toString());
/libcore/luni/src/main/java/java/util/
H A DArrays.java2306 StringBuilder buf = new StringBuilder(array.length * 9);
2307 deepToStringImpl(array, new Object[] { array }, buf);
2308 return buf.toString();
/libcore/luni/src/test/java/libcore/java/nio/channels/
H A DOldFileChannelTest.java197 byte[] buf = new byte[size];
201 fos.write(buf);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
H A DFileChannelTest.java320 byte[] buf = new byte[size];
324 fos.write(buf);
517 ByteBuffer buf = ByteBuffer.allocate(8);
518 assertEquals(8, specialFile.read(buf));
/libcore/luni/src/test/java/libcore/java/net/
H A DURLConnectionTest.java393 byte[] buf = new byte[writeKind == WriteKind.SMALL_BUFFERS ? 256 : 64*1024];
394 Arrays.fill(buf, (byte) 'x');
395 for (int i = 0; i < n; i += buf.length) {
396 out.write(buf, 0, Math.min(buf.length, n - i));

Completed in 935 milliseconds

1234567891011