/libcore/support/src/test/java/tests/security/ |
H A D | MessageDigestTest.java | 91 byte[] buf = new byte[128]; 93 while ((read = sourceData.read(buf)) != -1) { 94 digest.update(buf, 0, read);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/ |
H A D | ZipFileTest.java | 100 byte[] buf = new byte[4096]; 101 while ((result = in.read(buf)) != -1) { 102 out.write(buf, 0, result); 207 byte[] buf = new byte[256]; 208 r = in.read(buf); 210 assertEquals("incorrect contents", "This is also text", new String(buf,
|
/libcore/ojluni/src/main/java/java/io/ |
H A D | PrintStream.java | 484 * @param buf A byte array 488 public void write(byte buf[], int off, int len) { argument 492 out.write(buf, off, len); 511 private void write(char buf[]) { argument 517 textOut.write(buf); 521 for (int i = 0; i < buf.length; i++) 522 if (buf[i] == '\n')
|
/libcore/ojluni/src/main/java/java/lang/ |
H A D | FloatingDecimal.java | 1000 public void appendTo(AbstractStringBuilder buf) { argument 1001 if (isNegative) { buf.append('-'); } 1003 buf.append(digits, 0 , nDigits); 1009 buf.append(digits, 0 , charLength); 1012 buf.append(zero, 0 , charLength); 1013 buf.append(".0"); 1015 buf.append('.'); 1017 buf.append(digits, charLength, nDigits - charLength); 1019 buf.append('0'); 1023 buf [all...] |
/libcore/ojluni/src/main/java/java/text/ |
H A D | DigitList.java | 684 StringBuffer buf = getStringBuffer(); 685 buf.append("0."); 686 buf.append(digits, 0, count); 687 buf.append("x10^"); 688 buf.append(decimalAt); 689 return buf.toString();
|
/libcore/ojluni/src/main/java/java/util/jar/ |
H A D | Attributes.java | 395 byte[] buf = new byte[lastline.length + len - 1]; 396 System.arraycopy(lastline, 0, buf, 0, lastline.length); 397 System.arraycopy(lbuf, 1, buf, lastline.length, len - 1); 399 lastline = buf; 402 value = new String(buf, 0, buf.length, "UTF8");
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
H A D | InputStreamReaderTest.java | 113 char[] buf = new char[fileString.length()]; 114 fileString.getChars(0, fileString.length(), buf, 0); 115 osw.write(buf); 449 char[] buf = new char[8191]; 450 int bytesRead = isr.read(buf, 0, buf.length); 452 bytesRead = isr.read(buf, 0, buf.length);
|
H A D | FileOutputStreamTest.java | 113 byte[] buf = new byte[fileString.length() + 2]; 115 fis.read(buf, 0, buf.length); 116 assertTrue("Failed to create appending stream", new String(buf, 0, 117 buf.length).equals("HI" + fileString));
|
H A D | RandomAccessFileTest.java | 315 byte[] buf = new byte[10]; 319 raf.readFully(buf); 321 buf, 0, 10, "UTF-8")); 331 byte[] buf = new byte[10]; 335 raf.readFully(buf, 0, buf.length); 337 buf, 0, 10, "UTF-8")); 339 raf.readFully(buf, 0, buf.length); 457 byte[] buf [all...] |
H A D | SerializationStressTest.java | 348 byte[] buf = new byte[255]; 355 ois.readFully(buf); 358 if (buf[i] != output[i]) 369 byte[] buf = new byte[256]; 376 ois.readFully(buf); 379 if (buf[i] != output[i]) 402 byte[] buf = new byte[10]; 406 ois.read(buf, 0, 10); 408 assertEquals("Read incorrect bytes", "HelloWorld", new String(buf, 0, 10) 443 byte[] buf [all...] |
H A D | LineNumberReaderTest.java | 157 public int read(char[] buf, int offset, int len) throws IOException { 161 return delegate.read(buf, offset, len);
|
/libcore/ojluni/src/main/native/ |
H A D | net_util_md.h | 42 extern int NET_Read(int s, void* buf, size_t len); 43 extern int NET_RecvFrom(int s, void *buf, int len, unsigned int flags,
|
H A D | Character.cpp | 158 char buf[BUFSIZ]; // TODO: is there a more sensible upper bound? local 159 int32_t byteCount = u_charName(codePoint, nameType, &buf[0], sizeof(buf), &status); 160 return (U_FAILURE(status) || byteCount == 0) ? NULL : env->NewStringUTF(buf);
|
H A D | DatagramChannelImpl.c | 137 void *buf = (void *)jlong_to_ptr(address); local 152 n = recvfrom(fd, buf, len, 0, (struct sockaddr *)&sa, &sa_len); 229 void *buf = (void *)jlong_to_ptr(address); local 244 n = sendto(fd, buf, len, 0, (struct sockaddr *)&sa, sa_len);
|
H A D | java_util_zip_Inflater.c | 55 bufID = (*env)->GetFieldID(env, cls, "buf", "[B"); 90 Bytef *buf = (*env)->GetPrimitiveArrayCritical(env, b, 0); local 92 if (buf == 0) /* out of memory */ 94 res = inflateSetDictionary(jlong_to_ptr(addr), buf + off, len); 95 (*env)->ReleasePrimitiveArrayCritical(env, b, buf, 0);
|
H A D | java_util_zip_ZipFile.c | 172 char buf[MAXNAME+2], *path; local 182 path = buf; 191 if (path != buf) { 316 jbyte buf[BUFSIZE]; local 323 len = ZIP_Read(zip, jlong_to_ptr(zentry), pos, buf, len); 327 (*env)->SetByteArrayRegion(env, bytes, off, len, buf);
|
/libcore/luni/src/test/java/libcore/java/io/ |
H A D | OldRandomAccessFileTest.java | 758 byte[] buf = new byte[testLength]; 770 raf.readFully(buf); 772 testString, new String(buf)); 775 raf.readFully(buf); 789 raf.readFully(buf); 801 byte[] buf = new byte[testLength]; 813 raf.readFully(buf, 5, testLength - 10); 815 assertEquals("Test 2: Incorrect bytes read;", 0, buf[i]); 819 new String(buf, 5, testLength - 10)); 823 raf.readFully(buf, [all...] |
H A D | OldDataOutputStreamTest.java | 47 BufferedOutputStream buf = new BufferedOutputStream(bos); 49 os = new DataOutputStream(buf);
|
/libcore/luni/src/test/java/libcore/java/net/ |
H A D | ConcurrentCloseTest.java | 166 byte[] buf = new byte[200]; 167 DatagramPacket p = new DatagramPacket(buf, 200); 199 byte[] buf = new byte[sendBufferSize]; 200 s.getOutputStream().write(buf);
|
H A D | OldURLTest.java | 135 BufferedReader buf = new BufferedReader(new InputStreamReader( 138 while ((nextline = buf.readLine()) != null) { 142 buf.close(); 286 StringBuffer buf = new StringBuffer(32); 291 buf.append(inputLine); 298 assertTrue("Assert 0: Nothing was read from file ", buf.length() > 0); 299 assertEquals("Assert 1: Wrong stream content", "Hello World", buf 310 buf.append(inputLine);
|
/libcore/luni/src/test/java/libcore/java/nio/charset/ |
H A D | CharsetDecoderTest.java | 88 ByteBuffer buf = encoder.encode(CharBuffer.wrap(s)); 89 byte[] out = new byte[buf.remaining()]; 90 buf.get(out); 91 assertEquals(0, buf.remaining());
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
H A D | SignatureSpiTest.java | 359 byte[] buf = new byte[10]; 361 signature.sign(buf, 2, 1); 421 byte[] buf = new byte[10]; 424 signature.verify(buf, 2, 5);
|
/libcore/ojluni/src/main/java/sun/security/util/ |
H A D | DerValue.java | 304 * @param buf buffer holding a single DER-encoded datum. 306 public DerValue(byte[] buf) throws IOException { argument 307 data = init(true, new ByteArrayInputStream(buf)); 315 * @param buf the buffer 319 public DerValue(byte[] buf, int offset, int len) throws IOException { argument 320 data = init(true, new ByteArrayInputStream(buf, offset, len)); 362 byte[] buf = value.getBytes(enc); 363 length = buf.length; 364 buffer = new DerInputBuffer(buf);
|
/libcore/ojluni/src/main/java/java/util/ |
H A D | Locale.java | 1352 StringBuilder buf = new StringBuilder(); 1356 buf.append(LanguageTag.canonicalizeLanguage(subtag)); 1361 buf.append(LanguageTag.SEP); 1362 buf.append(LanguageTag.canonicalizeScript(subtag)); 1367 buf.append(LanguageTag.SEP); 1368 buf.append(LanguageTag.canonicalizeRegion(subtag)); 1373 buf.append(LanguageTag.SEP); 1375 buf.append(s); 1380 buf.append(LanguageTag.SEP); 1381 buf [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
H A D | DatagramChannelTest.java | 723 // buf is not empty 738 // buf is full 984 // buf is full 992 // buf is not empty 1131 ByteBuffer buf = ByteBuffer.wrap(new byte[CAPACITY_NORMAL]); 1132 assertNull(this.channel1.receive(buf)); 1161 byte[] buf = new byte[CAPACITY_NORMAL]; 1163 rdp = new DatagramPacket(buf, buf.length); 1165 assertEquals(new String(buf, 1354 connectWriteBuf(InetSocketAddress ipAddr, ByteBuffer buf) argument 1362 noconnectWrite(ByteBuffer buf) argument [all...] |