/libcore/support/src/test/java/tests/support/ |
H A D | Support_GetLocal.java | 47 byte[] buf = new byte[4096]; 48 while ((result = in.read(buf)) != -1) { 49 out.write(buf, 0, result); 67 byte[] buf = new byte[4096]; 68 while ((result = in.read(buf)) != -1) { 69 out.write(buf, 0, result); 83 byte[] buf = new byte[256]; 84 while ((result = in.read(buf)) != -1) { 85 out.write(buf, 0, result);
|
H A D | Support_TestWebServer.java | 283 byte[] buf; field in class:Support_TestWebServer.Worker 311 this.buf = new byte[BUF_SIZE]; 329 buf[i] = 0; 354 buf[read] = (byte)data; 359 if (buf[read++]==(byte)'\n') { 380 byte[] buf = new byte[length]; 384 count = is.read(buf, read, length-read); 412 if (buf[0] == (byte)'G' && 413 buf[1] == (byte)'E' && 414 buf[ [all...] |
H A D | ThrowingReader.java | 45 @Override public int read(char[] buf, int offset, int count) argument 53 int returned = super.read(buf, offset, count);
|
H A D | Support_StringReader.java | 133 * <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/luni/src/main/java/javax/xml/datatype/ |
H A D | Duration.java | 885 StringBuilder buf = new StringBuilder(); 888 buf.append('-'); 890 buf.append('P'); 894 buf.append(years).append('Y'); 899 buf.append(months).append('M'); 904 buf.append(days).append('D'); 911 buf.append('T'); 913 buf.append(hours).append('H'); 916 buf.append(minutes).append('M'); 919 buf [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
H A D | StringBufferInputStreamTest.java | 49 byte[] buf = new byte[5]; 51 sbis.read(buf, 0, 5); 52 assertEquals("Returned incorrect chars", "World", new String(buf, "UTF-8"));
|
/libcore/ojluni/src/main/java/sun/net/www/http/ |
H A D | ChunkedOutputStream.java | 45 private byte buf[]; field in class:ChunkedOutputStream 46 /* size of data (excluding footers and headers) already stored in buf */ 48 /* current index in buf (i.e. buf[count] */ 128 buf = new byte[preferredChunkDataSize + 32]; 145 out.write(buf, 0, preferredChunkGrossSize); 158 System.arraycopy(getHeader(size), 0, buf, 162 buf[count++] = FOOTER[0]; 163 buf[count++] = FOOTER[1]; 166 out.write(buf, adjustedHeaderStartInde [all...] |
/libcore/luni/src/test/java/libcore/java/io/ |
H A D | OldLineNumberInputStreamTest.java | 72 byte[] buf = new byte[100]; 73 lnis.read(buf, 0, 100); 75 new String(buf, 0, 100).equals(text.substring(0, 100))); 79 lnis.read(buf, 0, 100); 87 byte[] buf = new byte[10]; 90 lnis.read(buf, -1, 1); 97 lnis.read(buf, 0, -1); 104 lnis.read(buf, 10, 1);
|
/libcore/ojluni/src/main/java/java/util/zip/ |
H A D | InflaterOutputStream.java | 49 protected final byte[] buf; field in class:InflaterOutputStream 116 buf = new byte[bufLen]; 154 n = inf.inflate(buf, 0, buf.length); 160 out.write(buf, 0, n); 253 n = inf.inflate(buf, 0, buf.length); 255 out.write(buf, 0, n);
|
/libcore/ojluni/src/main/java/sun/util/locale/ |
H A D | LocaleUtils.java | 100 char[] buf = new char[len]; 103 buf[i] = (i < idx) ? c : toLower(c); 105 return new String(buf); 120 char[] buf = new char[len]; 123 buf[i] = (i < idx) ? c : toUpper(c); 125 return new String(buf); 145 char[] buf = new char[len]; 149 buf[i] = toUpper(c); 151 buf[i] = c; 153 buf[ [all...] |
H A D | BaseLocale.java | 123 StringBuilder buf = new StringBuilder(); 125 buf.append("language="); 126 buf.append(language); 129 if (buf.length() > 0) { 130 buf.append(", "); 132 buf.append("script="); 133 buf.append(script); 136 if (buf.length() > 0) { 137 buf.append(", "); 139 buf [all...] |
/libcore/ojluni/src/main/java/sun/nio/ch/ |
H A D | IOUtil.java | 120 ByteBuffer buf = bufs[i]; 121 int pos = buf.position(); 122 int lim = buf.limit(); 126 vec.setBuffer(iov_len, buf, pos, rem); 129 if (!(buf instanceof DirectBuffer)) { 131 shadow.put(buf); 134 buf.position(pos); // temporarily restore position in user buffer 135 buf = shadow; 139 vec.putBase(iov_len, ((DirectBuffer)buf).address() + pos); 154 ByteBuffer buf [all...] |
/libcore/ojluni/src/main/java/java/util/jar/ |
H A D | Manifest.java | 235 byte[] buf = new byte[lastline.length + len - 1]; 236 System.arraycopy(lastline, 0, buf, 0, lastline.length); 237 System.arraycopy(lbuf, 1, buf, lastline.length, len - 1); 240 lastline = buf; 243 name = new String(buf, 0, buf.length, "UTF8"); 322 private byte buf[]; field in class:Manifest.FastInputStream 332 buf = new byte[size]; 342 return buf[pos++] & 0xff; 348 if (len >= buf [all...] |
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
H A D | DigestInputStream2Test.java | 138 byte[] buf = null; 140 is.read(buf, -1, 0); 146 buf = new byte[1000]; 148 is.read(buf, -1, 0); 155 is.read(buf, 0, -1); 162 is.read(buf, -1, -1); 169 is.read(buf, 0, 1001); 176 is.read(buf, 1001, 0); 183 is.read(buf, 500, 501); 194 is.read(buf, [all...] |
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
H A D | OldSocketChannelTest.java | 111 java.nio.ByteBuffer[] buf = new java.nio.ByteBuffer[1]; 112 buf[0] = java.nio.ByteBuffer.allocateDirect(CAPACITY_NORMAL); 124 this.channel1.write(buf); 290 ByteBuffer buf = ByteBuffer.allocate(10); 291 buf.put(data); 292 buf.rewind(); 293 ssc.accept().write(buf); 305 ByteBuffer buf = ByteBuffer.allocate(data.length); 306 buf.limit(data.length / 2); 307 sc.read(buf); 334 assertSameContent(byte[] data, ByteBuffer buf) argument [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
H A D | DatagramPacketTest.java | 210 byte buf[] = new byte[1]; 212 new DatagramPacket(buf, 1, new UnsupportedSocketAddress()); 220 new DatagramPacket(buf, 1, null); 229 DatagramPacket thePacket = new DatagramPacket(buf, 1, theAddress); 251 byte buf[] = new byte[2]; 253 new DatagramPacket(buf, 1, 1, new UnsupportedSocketAddress()); 261 new DatagramPacket(buf, 1, 1, null); 270 DatagramPacket thePacket = new DatagramPacket(buf, 1, 1, theAddress); 283 byte buf[] = new byte[1]; 284 DatagramPacket thePacket = new DatagramPacket(buf, [all...] |
/libcore/ojluni/src/main/java/java/nio/ |
H A D | HeapCharBuffer.java | 53 HeapCharBuffer(char[] buf, int off, int len) { // package-private argument 54 this(buf, off, len, false); 57 HeapCharBuffer(char[] buf, int off, int len, boolean isReadOnly) { // package-private argument 58 super(-1, off, off + len, buf.length, buf, 0); 62 protected HeapCharBuffer(char[] buf, argument 65 this(buf, mark, pos, lim, cap, off, false); 68 protected HeapCharBuffer(char[] buf, argument 71 super(mark, pos, lim, cap, buf, off);
|
H A D | HeapDoubleBuffer.java | 48 HeapDoubleBuffer(double[] buf, int off, int len) { // package-private argument 49 this(buf, off, len, false); 52 protected HeapDoubleBuffer(double[] buf, argument 55 this(buf, mark, pos, lim, cap, off, false); 63 HeapDoubleBuffer(double[] buf, int off, int len, boolean isReadOnly) { // package-private argument 64 super(-1, off, off + len, buf.length, buf, 0); 68 protected HeapDoubleBuffer(double[] buf, argument 71 super(mark, pos, lim, cap, buf, off);
|
H A D | HeapFloatBuffer.java | 53 HeapFloatBuffer(float[] buf, int off, int len) { // package-private argument 54 this(buf, off, len, false); 57 HeapFloatBuffer(float[] buf, int off, int len, boolean isReadOnly) { // package-private argument 58 super(-1, off, off + len, buf.length, buf, 0); 62 protected HeapFloatBuffer(float[] buf, argument 65 this(buf, mark, pos, lim, cap, off, false); 68 protected HeapFloatBuffer(float[] buf, argument 71 super(mark, pos, lim, cap, buf, off);
|
H A D | HeapIntBuffer.java | 53 HeapIntBuffer(int[] buf, int off, int len) { // package-private argument 54 this(buf, off, len, false); 57 HeapIntBuffer(int[] buf, int off, int len, boolean isReadOnly) { // package-private argument 58 super(-1, off, off + len, buf.length, buf, 0); 62 protected HeapIntBuffer(int[] buf, argument 65 this(buf, mark, pos, lim, cap, off, false); 68 protected HeapIntBuffer(int[] buf, argument 71 super(mark, pos, lim, cap, buf, off);
|
H A D | HeapLongBuffer.java | 54 HeapLongBuffer(long[] buf, int off, int len) { // package-private argument 55 this(buf, off, len, false); 58 HeapLongBuffer(long[] buf, int off, int len, boolean isReadOnly) { // package-private argument 59 super(-1, off, off + len, buf.length, buf, 0); 63 protected HeapLongBuffer(long[] buf, argument 66 this(buf, mark, pos, lim, cap, off, false); 69 protected HeapLongBuffer(long[] buf, argument 72 super(mark, pos, lim, cap, buf, off);
|
H A D | HeapShortBuffer.java | 53 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/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/ |
H A D | ChunkHandler.java | 92 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/util/zip/ |
H A D | OldAndroidGZIPStreamTest.java | 98 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 D | MessageDigestSpi.java | 155 * @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);
|