Searched refs:buf (Results 126 - 150 of 314) sorted by relevance

1234567891011>>

/libcore/ojluni/src/main/java/java/nio/
H A DHeapShortBuffer.java53 HeapShortBuffer(short[] buf, int off, int len) { // package-private argument
54 this(buf, off, len, false);
57 HeapShortBuffer(short[] buf, int off, int len, boolean isReadOnly) { // package-private argument
58 super(-1, off, off + len, buf.length, buf, 0);
62 protected HeapShortBuffer(short[] buf, argument
65 this(buf, mark, pos, lim, cap, off, false);
68 protected HeapShortBuffer(short[] buf, argument
71 super(mark, pos, lim, cap, buf, off);
/libcore/ojluni/src/test/java/time/test/java/time/format/
H A DTestNumberPrinter.java84 getFormatter(DAY_OF_MONTH, 1, 2, SignStyle.NEVER).formatTo(EMPTY_DTA, buf);
88 buf.append("EXISTING");
89 getFormatter(DAY_OF_MONTH, 1, 2, SignStyle.NEVER).formatTo(LocalDate.of(2012, 1, 3), buf);
90 assertEquals(buf.toString(), "EXISTING3");
187 getFormatter(DAY_OF_MONTH, minPad, maxPad, SignStyle.NOT_NEGATIVE).formatTo(new MockFieldValue(DAY_OF_MONTH, value), buf);
191 assertEquals(buf.toString(), result);
204 getFormatter(DAY_OF_MONTH, minPad, maxPad, SignStyle.NEVER).formatTo(new MockFieldValue(DAY_OF_MONTH, value), buf);
208 assertEquals(buf.toString(), result);
220 getFormatter(DAY_OF_MONTH, minPad, maxPad, SignStyle.NORMAL).formatTo(new MockFieldValue(DAY_OF_MONTH, value), buf);
224 assertEquals(buf
[all...]
H A DTestZoneOffsetPrinter.java152 buf.append("EXISTING");
153 getFormatter(pattern, "NO-OFFSET").formatTo(offset, buf);
154 assertEquals(buf.toString(), "EXISTING" + expected);
165 getFormatter("+HH:MM:ss", "Z").formatTo(EMPTY_DTA, buf);
169 getFormatter("+HH:MM:ss", "Z").formatTo(OFFSET_0130, buf);
170 assertEquals(buf.toString(), "+01:30");
H A DTestFractionPrinterParser.java93 getFormatter(NANO_OF_SECOND, 0, 9, true).formatTo(EMPTY_DTA, buf);
97 buf.append("EXISTING");
98 getFormatter(NANO_OF_SECOND, 0, 9, true).formatTo(LocalTime.of(12, 30, 40, 3), buf);
99 assertEquals(buf.toString(), "EXISTING.000000003");
181 getFormatter(NANO_OF_SECOND, minWidth, maxWidth, true).formatTo(new MockFieldValue(NANO_OF_SECOND, value), buf);
185 assertEquals(buf.toString(), result);
190 getFormatter(NANO_OF_SECOND, minWidth, maxWidth, false).formatTo(new MockFieldValue(NANO_OF_SECOND, value), buf);
194 assertEquals(buf.toString(), (result.startsWith(".") ? result.substring(1) : result));
223 getFormatter(SECOND_OF_MINUTE, minWidth, maxWidth, true).formatTo(new MockFieldValue(SECOND_OF_MINUTE, value), buf);
227 assertEquals(buf
[all...]
H A DTestTextPrinter.java93 getFormatter(DAY_OF_WEEK, TextStyle.FULL).formatTo(EMPTY_DTA, buf);
97 buf.append("EXISTING");
98 getFormatter(DAY_OF_WEEK, TextStyle.FULL).formatTo(LocalDate.of(2012, 4, 18), buf);
99 assertEquals(buf.toString(), "EXISTINGWednesday");
248 getFormatter(field, style).formatTo(new MockFieldValue(field, value), buf);
249 assertEquals(buf.toString(), expected);
262 getFormatter(field, style).withChronology(JapaneseChronology.INSTANCE).formatTo(ld, buf);
263 assertEquals(buf.toString(), expected);
268 getFormatter(field, style).withLocale(locale).formatTo(LocalDate.of(2013, 1, 1), buf);
269 assertEquals(buf
[all...]
/libcore/ojluni/src/main/java/java/time/temporal/
H A DValueRange.java418 StringBuilder buf = new StringBuilder();
419 buf.append(minSmallest);
421 buf.append('/').append(minLargest);
423 buf.append(" - ").append(maxSmallest);
425 buf.append('/').append(maxLargest);
427 return buf.toString();
/libcore/ojluni/src/main/native/
H A Djni_util_md.c52 getErrorString(int err, char *buf, size_t len) argument
55 return strerror_r(err, buf, len);
/libcore/support/src/test/java/tests/support/
H A DThrowingReader.java45 @Override public int read(char[] buf, int offset, int count) argument
53 int returned = super.read(buf, offset, count);
H A DSupport_StringReader.java133 * <code>buf</code>. Returns the number of characters actually read or -1
136 * @param buf
139 * offset in buf to store the read characters
148 public int read(char buf[], int offset, int count) throws IOException { argument
150 if (0 <= offset && offset <= buf.length && 0 <= count
151 && count <= buf.length - offset) {
159 str.getChars(pos, end, buf, offset);
/libcore/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/
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/luni/src/test/java/libcore/java/net/
H A DMulticastSocketTest.java69 byte[] buf = new byte[expectedMsg.length()];
70 DatagramPacket recvPacket = new DatagramPacket(buf, buf.length);
73 assertTrue(new String(buf).equals(expectedMsg));
/libcore/dalvik/src/main/java/dalvik/system/
H A DDexFile.java106 DexFile(ByteBuffer buf) throws IOException { argument
107 mCookie = openInMemoryDexFile(buf);
362 private static Object openInMemoryDexFile(ByteBuffer buf) throws IOException { argument
363 if (buf.isDirect()) {
364 return createCookieWithDirectBuffer(buf, buf.position(), buf.limit());
366 return createCookieWithArray(buf.array(), buf.position(), buf
370 createCookieWithDirectBuffer(ByteBuffer buf, int start, int end) argument
371 createCookieWithArray(byte[] buf, int start, int end) argument
[all...]
/libcore/luni/src/test/java/libcore/java/util/zip/
H A DOldAndroidGZIPStreamTest.java98 byte[] buf = new byte[4096];
101 while ((len = in.read(buf)) > 0) {
102 contents.write(buf, 0, len);
/libcore/ojluni/src/main/java/java/security/
H A DMessageDigestSpi.java155 * @param buf the output buffer in which to store the digest
159 * @param len number of bytes within buf allotted for the digest.
173 protected int engineDigest(byte[] buf, int offset, int len) argument
179 if (buf.length - offset < digest.length)
182 System.arraycopy(digest, 0, buf, offset, digest.length);
/libcore/ojluni/src/main/java/sun/misc/
H A DHexDumpEncoder.java91 protected void encodeAtom(OutputStream o, byte buf[], int off, int len) throws IOException { argument
92 thisLine[currentByte] = buf[off];
93 hexDigit(pStream, buf[off]);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
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 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...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
H A DAttributedStringTest.java36 StringBuffer buf = new StringBuffer();
37 buf.append(it.first());
40 buf.append(ch);
41 assertTrue("Wrong string: " + buf, buf.toString().equals(test));
/libcore/ojluni/src/main/java/java/util/zip/
H A DDeflaterInputStream.java50 protected final byte[] buf; field in class:DeflaterInputStream
117 buf = new byte[bufLen];
189 n = in.read(buf, 0, buf.length);
194 def.setInput(buf, 0, n);
H A DInflaterInputStream.java52 protected byte[] buf; field in class:InflaterInputStream
91 buf = new byte[size];
250 len = in.read(buf, 0, buf.length);
254 inf.setInput(buf, 0, len);
/libcore/luni/src/test/java/libcore/java/io/
H A DOldPipedWriterTest.java33 public char[] buf; field in class:OldPipedWriterTest.PReader
59 buf = new char[nbytes];
61 pr.read(buf, 0, nbytes);
62 return new String(buf);
211 Arrays.equals( testBuf, reader.buf));
254 (int) reader.buf[0] + " " + (int) reader.buf[1] + " " + (int) reader.buf[2],
255 reader.buf[0] == 1 && reader.buf[
[all...]
H A DOldFilterInputStreamTest.java174 byte[] buf = null;
176 is.read(buf, -1, 0);
182 buf = new byte[1000];
184 is.read(buf, -1, 0);
191 is.read(buf, 0, -1);
198 is.read(buf, -1, -1);
205 is.read(buf, 0, 1001);
212 is.read(buf, 1001, 0);
219 is.read(buf, 500, 501);
227 is.read(buf,
[all...]
/libcore/ojluni/src/main/java/sun/security/util/
H A DDebug.java171 StringBuffer buf = new StringBuffer(hexValue.length()*2);
174 buf.append(" -");
177 buf.append(" "); // four spaces
186 buf.append(hexValue.substring(i, i+2));
190 buf.append("\n "); // line after eight words
192 buf.append(" "); // space between words
196 return buf.toString();
/libcore/ojluni/src/main/java/java/lang/
H A DInteger.java140 char buf[] = new char[33];
149 buf[charPos--] = digits[-(i % radix)];
152 buf[charPos] = digits[-i];
155 buf[--charPos] = '-';
158 return new String(buf, charPos, (33 - charPos));
314 char[] buf = new char[chars];
316 formatUnsignedInt(val, shift, buf, 0, chars);
318 // Use special constructor which takes over "buf".
319 return new String(buf);
326 * @param buf th
331 formatUnsignedInt(int val, int shift, char[] buf, int offset, int len) argument
461 getChars(int i, int index, char[] buf) argument
[all...]
/libcore/ojluni/src/main/java/java/io/
H A DDataInputStream.java499 char buf[] = lineBuffer;
501 if (buf == null) {
502 buf = lineBuffer = new char[128];
505 int room = buf.length;
527 buf = new char[offset + 128];
528 room = buf.length - offset - 1;
529 System.arraycopy(lineBuffer, 0, buf, 0, offset);
530 lineBuffer = buf;
532 buf[offset++] = (char) c;
539 return String.copyValueOf(buf,
[all...]

Completed in 536 milliseconds

1234567891011>>