Searched refs:buf (Results 176 - 200 of 282) sorted by relevance

1234567891011>>

/libcore/support/src/test/java/org/apache/harmony/testframework/
H A DCharWrapperTester.java207 public void write(char[] buf, int offset, int count) throws IOException { argument
211 buffer.append(buf, offset, count);
220 public void write(char[] buf, int offset, int count) throws IOException { argument
249 public void write(char[] buf, int offset, int count) throws IOException { argument
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/
H A DTestCertUtils.java213 StringBuffer buf = new StringBuffer(200);
214 buf.append("TestCertPath. certs count=");
216 buf.append("0\n");
219 buf.append(certs.length).append("\n");
221 buf.append("\t").append(i).append(" ");
222 buf.append(certs[i]).append("\n");
225 return buf.toString();
783 StringBuffer buf = new StringBuffer();
788 buf.append(name).append('=').append(val).append(",");
792 buf
[all...]
/libcore/ojluni/src/main/java/java/nio/
H A DMappedByteBuffer.java87 MappedByteBuffer(int mark, int pos, int lim, int cap, byte[] buf, int offset) { argument
88 super(mark, pos, lim, cap, buf, offset);
H A DHeapByteBuffer.java58 HeapByteBuffer(byte[] buf, int off, int len) { // package-private argument
59 this(buf, off, len, false);
62 HeapByteBuffer(byte[] buf, int off, int len, boolean isReadOnly) { // package-private argument
63 super(-1, off, off + len, buf.length, buf, 0);
67 protected HeapByteBuffer(byte[] buf, argument
70 this(buf, mark, pos, lim, cap, off, false);
73 protected HeapByteBuffer(byte[] buf, argument
76 super(mark, pos, lim, cap, buf, off);
/libcore/ojluni/src/main/native/
H A DFileDispatcherImpl.c64 void *buf = (void *)jlong_to_ptr(address); local
66 return convertReturnVal(env, read(fd, buf, len), JNI_TRUE);
74 void *buf = (void *)jlong_to_ptr(address); local
76 return convertReturnVal(env, pread64(fd, buf, len, offset), JNI_TRUE);
93 void *buf = (void *)jlong_to_ptr(address); local
95 return convertReturnVal(env, write(fd, buf, len), JNI_FALSE);
103 void *buf = (void *)jlong_to_ptr(address); local
105 return convertReturnVal(env, pwrite64(fd, buf, len, offset), JNI_FALSE);
/libcore/dom/src/test/java/org/w3c/domts/
H A DDOMTest.java187 java.lang.StringBuffer buf = new StringBuffer(httpBase);
189 buf.append("/");
191 buf.append("tmp");
192 buf.append( (new java.util.Random()).nextInt(Integer.MAX_VALUE));
193 buf.append(".xml");
194 return buf.toString();
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DPipedInputStreamTest.java200 byte[] buf = new byte[400];
206 pis.read(buf, 0, 400);
208 assertEquals("read returned incorrect byte[]", pw.bytes[i], buf[i]);
358 byte[] buf = new byte[1];
359 assertEquals("Write end is closed, should return -1", -1, in.read(buf, 0, 1));
360 assertEquals("Buf len 0 should return first", 0, in.read(buf, 0, 0));
H A DOutputStreamWriterTest.java622 char[] buf = new char[testString.length()];
626 isr.read(buf, 0, buf.length);
627 assertTrue("Chars not flushed", new String(buf, 0, buf.length)
665 char[] buf = new char[testString.length()];
669 isr.read(buf, 0, buf.length);
670 assertTrue("Incorrect chars returned", new String(buf, 0, buf
[all...]
H A DPipedOutputStreamTest.java63 byte[] buf = new byte[nbytes];
65 reader.read(buf, 0, nbytes);
66 return new String(buf, "UTF-8");
H A DReaderTest.java184 public int read(char[] buf, int offset, int count) throws IOException { argument
192 if (buf.length < offset + count) {
198 buf[offset + i] = contents[current_offset + i];
/libcore/luni/src/test/java/libcore/java/security/
H A DMessageDigestTest.java242 StringBuffer buf = new StringBuffer();
243 buf.append("new byte[] { ");
245 buf.append(b);
246 buf.append(", ");
248 buf.append(" }");
249 return buf.toString();
/libcore/ojluni/src/main/java/java/security/
H A DMessageDigest.java389 * @param buf output buffer for the computed digest
393 * @param len number of bytes within buf allotted for the digest
395 * @return the number of bytes placed into <code>buf</code>
399 public int digest(byte[] buf, int offset, int len) throws DigestException { argument
400 if (buf == null) {
403 if (buf.length - offset < len) {
407 int numBytes = engineDigest(buf, offset, len);
609 protected int engineDigest(byte[] buf, int offset, int len) argument
611 return digestSpi.engineDigest(buf, offset, len);
/libcore/ojluni/src/main/java/sun/security/pkcs/
H A DPKCS9Attributes.java326 StringBuffer buf = new StringBuffer(200);
327 buf.append("PKCS9 Attributes: [\n\t");
342 buf.append(";\n\t");
344 buf.append(value.toString());
347 buf.append("\n\t] (end PKCS9 Attributes)");
349 return buf.toString();
H A DPKCS9Attribute.java792 StringBuffer buf = new StringBuffer(100);
794 buf.append("[");
797 buf.append(oid.toString());
799 buf.append(OID_NAME_TABLE.get(PKCS9_OIDS[index]));
801 buf.append(": ");
806 buf.append(hexDump.encodeBuffer((byte[]) value));
808 buf.append(value.toString());
810 buf.append("]");
811 return buf.toString();
820 buf
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
H A DString2Test.java41 char[] buf = { 'W', 'o', 'r', 'l', 'd' }; field in class:String2Test
130 assertEquals("Failed Constructor test", "World", new String(buf));
138 char[] buf = { 'H', 'e', 'l', 'l', 'o', 'W', 'o', 'r', 'l', 'd' };
139 String s = new String(buf, 0, buf.length);
430 byte[] buf = new byte[5];
431 "Hello World".getBytes(6, 11, buf, 0);
432 assertEquals("Returned incorrect bytes", "World", new String(buf));
448 byte[] buf = "Hello World".getBytes();
449 assertEquals("Returned incorrect bytes", "Hello World", new String(buf));
[all...]
H A DProcessBuilderTest.java164 byte[] buf = new byte[1024];
166 assertTrue(in.read(buf) > 0);
168 assertTrue(err.read(buf) > 0);
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/
H A DInnerNodeImpl.java214 StringBuilder buf = new StringBuilder();
215 getTextContent(buf);
216 return buf.toString();
219 void getTextContent(StringBuilder buf) throws DOMException { argument
223 ((NodeImpl) child).getTextContent(buf);
/libcore/ojluni/src/main/java/java/io/
H A DPrintWriter.java418 * @param buf Array of characters
422 public void write(char buf[], int off, int len) { argument
426 out.write(buf, off, len);
440 * @param buf Array of characters to be written
442 public void write(char buf[]) { argument
443 write(buf, 0, buf.length);
/libcore/xml/src/main/java/org/kxml2/io/
H A DKXmlParser.java1869 StringBuilder buf = new StringBuilder(type < TYPES.length ? TYPES[type] : "unknown");
1870 buf.append(' ');
1874 buf.append("(empty) ");
1876 buf.append('<');
1878 buf.append('/');
1882 buf.append("{" + namespace + "}" + prefix + ":");
1884 buf.append(name);
1888 buf.append(' ');
1890 buf.append("{" + attributes[i] + "}" + attributes[i + 1] + ":");
1892 buf
[all...]
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/io/
H A DObjectInputStreamTest.java231 byte[] buf = new byte[testLength];
237 ois.read(buf, 0, -1);
243 ois.read(buf, -1,1);
249 ois.read(buf, testLength, 1);
261 ois.read(buf, 0, testLength);
271 byte[] buf = new byte[testLength];
275 ois.readFully(buf);
277 testString, new String(buf));
283 ois.readFully(buf);
291 byte[] buf
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
H A DSocketChannelTest.java130 java.nio.ByteBuffer[] buf = new java.nio.ByteBuffer[1];
131 buf[0] = java.nio.ByteBuffer.allocateDirect(CAPACITY_NORMAL);
140 this.channel1.write(buf);
2570 java.nio.ByteBuffer[] buf = new java.nio.ByteBuffer[1];
2572 assertEquals(0, this.channel1.write(buf, 0, 0));
2574 this.channel1.write(buf, -1, 1);
2579 this.channel1.write(buf, 0, -1);
2584 this.channel1.write(buf, 0, 2);
2589 this.channel1.write(buf, 2, 0);
2602 java.nio.ByteBuffer[] buf
[all...]
/libcore/luni/src/test/java/libcore/java/io/
H A DOldPipedOutputStreamTest.java61 byte[] buf = new byte[nbytes];
63 reader.read(buf, 0, nbytes);
64 return new String(buf);
/libcore/luni/src/test/java/libcore/java/nio/charset/
H A DCharset_TestGenerator.java149 char[] buf = new char[8]; field in class:Charset_TestGenerator.CodesGenerator3
153 buf[col] = (char) code;
159 System.out.println(buf);
/libcore/ojluni/src/main/java/java/util/zip/
H A DDeflater.java79 private byte[] buf = new byte[0]; field in class:Deflater
207 this.buf = b;
532 buf = null;
/libcore/ojluni/src/main/java/sun/net/www/
H A DMimeLauncher.java118 byte buf[] = new byte[2048];
121 while ((i = is.read(buf)) >= 0) {
122 os.write(buf, 0, i);

Completed in 2210 milliseconds

1234567891011>>