Searched refs:buf (Results 1 - 25 of 282) sorted by path

1234567891011>>

/libcore/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/
H A DChunk.java56 public Chunk(int type, ByteBuffer buf) { argument
59 this.data = buf.array();
60 this.offset = buf.arrayOffset();
61 this.length = buf.position();
H A DChunkHandler.java92 public static String getString(ByteBuffer buf, int len) { argument
95 data[i] = buf.getChar();
102 public static void putString(ByteBuffer buf, String str) { argument
105 buf.putChar(str.charAt(i));
/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();
H A DDOMTestIncompatibleException.java52 StringBuffer buf = new StringBuffer(
54 buf.append(feature);
55 buf.append("\" version=\"");
56 buf.append(version);
57 buf.append("\".");
58 return new DOMTestIncompatibleException(buf.toString());
63 StringBuffer buf = new StringBuffer(
65 buf.append(href);
66 buf.append("\" not available for =\"");
67 buf
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DBufferedInputStreamTest.java141 assertNotNull(MockBufferedInputStream.buf);
142 MockBufferedInputStream.buf = null;
144 assertNotNull(MockBufferedInputStream.buf);
148 static byte[] buf; field in class:BufferedInputStreamTest.MockBufferedInputStream
152 buf = super.buf;
157 buf = super.buf;
191 BufferedInputStream buf = new BufferedInputStream(null, 5);
192 buf
[all...]
H A DBufferedReaderTest.java106 char[] buf = null;
112 buf = new char[testString.length()];
113 br.read(buf, 0, 500);
115 1000).equals(new String(buf, 0, 500)));
121 br.read(buf, 0, 1000);
210 char[] buf = new char[14];
211 in.read(buf, 0, 14); // Read greater than the buffer
212 assertTrue("Wrong block read data", new String(buf)
289 char[] buf = new char[testString.length()];
291 br.read(buf, 5
[all...]
H A DBufferedWriterTest.java57 public void write(char[] buf, int off, int len) throws IOException { argument
59 sb.append(buf[i]);
H A DByteArrayInputStreamTest.java59 public static byte[] buf; field in class:ByteArrayInputStreamTest.SubByteArrayInputStream
63 SubByteArrayInputStream(byte[] buf, int offset, int length) argument
65 super(buf, offset, length);
66 buf = super.buf;
H A DFileInputStreamTest.java262 byte[] buf = new byte[1000];
265 is.read(buf, -1, 0);
275 is.read(buf, 0, -1);
285 is.read(buf, -1, -1);
295 is.read(buf, 0, 1001);
305 is.read(buf, 1001, 0);
315 is.read(buf, 500, 501);
326 is.read(buf, 0, 100);
337 is.read(buf, 0, 0);
347 byte[] buf
[all...]
H A DFileOutputStreamTest.java113 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 DFileReaderTest.java47 char[] buf = new char[100];
48 int r = br.read(buf);
51 new String(buf, 0, r));
63 char[] buf = new char[100];
64 int r = br.read(buf);
68 new String(buf, 0, r));
79 char[] buf = new char[100];
80 int r = br.read(buf);
83 new String(buf, 0, r));
H A DFileWriterTest.java49 char[] buf = new char[100];
50 int r = br.read(buf);
53 new String(buf, 0, r));
103 char[] buf = new char[100];
104 int r = br.read(buf);
107 assertTrue("Failed to write correct chars: " + new String(buf, 0, r),
108 new String(buf, 0, r).equals("Test String"));
122 char[] buf = new char[100];
123 int r = br.read(buf);
126 new String(buf,
[all...]
H A DInputStreamReaderTest.java113 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 DLineNumberInputStreamTest.java103 byte[] buf = new byte[100];
104 lnis.read(buf, 0, 100);
106 buf, 0, 100, "UTF-8").equals(text.substring(0, 100)));
H A DLineNumberReaderTest.java157 public int read(char[] buf, int offset, int len) throws IOException {
161 return delegate.read(buf, offset, len);
H A DObjectOutputStreamTest.java731 byte[] buf = new byte[10];
735 ois.read(buf, 0, 10);
737 assertEquals("Read incorrect bytes", "HelloWorld", new String(buf, 0,
747 byte[] buf = new byte[10];
751 ois.read(buf, 0, 10);
753 assertEquals("Read incorrect bytes", "HelloWorld", new String(buf, 0,
797 byte[] buf = new byte[10];
801 ois.readFully(buf);
804 buf, 0, 10, "UTF-8"));
825 char[] buf
[all...]
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 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 DPipedOutputStreamTest.java63 byte[] buf = new byte[nbytes];
65 reader.read(buf, 0, nbytes);
66 return new String(buf, "UTF-8");
H A DPipedWriterTest.java29 public char[] buf = new char[10]; field in class:PipedWriterTest.PReader
46 for (int i = 0; i < buf.length; i++) {
50 buf[i] = (char) r;
77 char[] buf = new char[10];
78 "HelloWorld".getChars(0, 10, buf, 0);
83 pw.write(buf);
87 reader.buf));
95 char[] buf = new char[10];
96 "HelloWorld".getChars(0, 10, buf, 0);
102 pw.write(buf);
[all...]
H A DPushbackInputStreamTest.java147 byte[] buf = new byte[100];
148 pis.read(buf, 0, buf.length);
149 assertTrue("Incorrect bytes read", new String(buf, "UTF-8")
161 byte[] buf = new byte[50];
163 pis.read(buf, 0, buf.length);
164 assertTrue("a) Incorrect bytes read", new String(buf, "UTF-8")
166 pis.unread(buf);
180 byte[] buf
[all...]
H A DPushbackReaderTest.java41 char buf[] = new char[5];
42 pbr.read(buf, 0, 5);
43 pbr.unread(buf);
H A DRandomAccessFileTest.java315 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 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];
H A DSequenceInputStreamTest.java89 byte buf[] = new byte[s1.length() + s2.length()];
90 si.read(buf, 0, s1.length());
91 si.read(buf, s1.length(), s2.length());
92 assertTrue("Read incorrect bytes: " + new String(buf), new String(
93 buf, "UTF-8").equals(s1 + s2));
148 byte buf[] = new byte[s1.length() + s2.length()];
149 si.read(buf, 0, s1.length());
150 si.read(buf, s1.length(), s2.length());
151 assertTrue("Read incorrect bytes: " + new String(buf), new String(
152 buf, "UT
[all...]

Completed in 128 milliseconds

1234567891011>>