Searched refs:buffer (Results 51 - 75 of 147) sorted by relevance

123456

/libcore/luni/src/test/java/libcore/javax/crypto/
H A DCipherInputStreamTest.java83 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument
84 int numRead = super.read(buffer, byteOffset, byteCount);
168 byte[] buffer = new byte[1024];
169 while ((count = in.read(buffer)) != -1) {
170 out.write(buffer, 0, count);
193 byte[] buffer = new byte[128];
195 is.read(buffer);
201 is.read(buffer, 0, buffer.length);
H A DECDHKeyAgreementTest.java266 byte[] buffer = new byte[KAT_SECRET.length];
267 int secretLengthBytes = keyAgreement.generateSecret(buffer, 0);
269 assertTrue(Arrays.equals(KAT_SECRET, buffer));
281 // Place the shared secret in the middle of the larger buffer and check that only that
282 // part of the buffer is affected.
283 byte[] buffer = new byte[KAT_SECRET.length + 2];
284 buffer[0] = (byte) 0x85; // arbitrary canary value
285 buffer[buffer.length - 1] = (byte) 0x3b; // arbitrary canary value
286 int secretLengthBytes = keyAgreement.generateSecret(buffer,
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DBufferedOutputStreamTest.java141 assertTrue("Bytes not written when buffer full",
672 byte[] buffer = "1234567890".getBytes();
676 buffos.write(buffer, 0, 10);
685 byte[] buffer = "1234567890".getBytes("UTF-8");
688 buffos.write(buffer, 0, 10);
696 assertEquals(buffer[i], byteArrayis.read());
699 buffos.write(buffer, 0, 10);
707 assertEquals(buffer[i], byteArrayis.read());
710 assertEquals(buffer[i], byteArrayis.read());
713 buffos.write(buffer,
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
H A DScannerParseLargeFileBenchmarkTest.java53 public int read(char[] buffer, int offset, int length) { argument
63 buffer[bufferIndex++] = CONTENT[contentIndex++];
/libcore/ojluni/src/main/java/java/text/
H A DSimpleDateFormat.java855 * Encodes the given tag and length and puts encoded char(s) into buffer.
857 private static final void encode(int tag, int length, StringBuilder buffer) { argument
862 buffer.append((char)(tag << 8 | length));
864 buffer.append((char)((tag << 8) | 0xff));
865 buffer.append((char)(length >>> 16));
866 buffer.append((char)(length & 0xffff));
1062 FieldDelegate delegate, StringBuffer buffer,
1067 int beginOffset = buffer.length();
1110 zeroPaddingNumber(value, count, maxIntCount, buffer);
1112 zeroPaddingNumber(value, 2, 2, buffer); // cli
1061 subFormat(int patternCharIndex, int count, FieldDelegate delegate, StringBuffer buffer, boolean useDateFormatSymbols) argument
1292 formatMonth(int count, int value, int maxIntCount, StringBuffer buffer, boolean useDateFormatSymbols, boolean standalone) argument
1326 zeroPaddingNumber(int value, int minDigits, int maxDigits, StringBuffer buffer) argument
[all...]
H A DFieldPosition.java286 int end, StringBuffer buffer) {
295 int start, int end, StringBuffer buffer) {
285 formatted(Format.Field attr, Object value, int start, int end, StringBuffer buffer) argument
294 formatted(int fieldID, Format.Field attr, Object value, int start, int end, StringBuffer buffer) argument
H A DFormat.java162 * buffer.
171 * @return the string buffer passed in as <code>toAppendTo</code>,
385 * @param end End of the field, will be >= start and <= buffer.length()
386 * @param buffer Contains current formatted value, receiver should
390 int end, StringBuffer buffer);
399 * @param end End of the field, will be >= start and <= buffer.length()
400 * @param buffer Contains current formatted value, receiver should
404 int start, int end, StringBuffer buffer);
389 formatted(Format.Field attr, Object value, int start, int end, StringBuffer buffer) argument
403 formatted(int fieldID, Format.Field attr, Object value, int start, int end, StringBuffer buffer) argument
/libcore/ojluni/src/main/java/java/util/regex/
H A DMatcher.java69 * the result into an existing string buffer, or the more convenient {@link
529 * append position, and appends them to the given string buffer. It
534 * <li><p> It appends the given replacement string to the string buffer.
553 * cause <tt>"foobar"</tt> to be appended to the string buffer. A dollar
580 * The target string buffer
608 * Internal helper method to append a given string to a given string buffer.
612 * @param buffer the string buffer.
615 private void appendEvaluated(StringBuffer buffer, String s) { argument
626 buffer
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
H A DSourceChannelTest.java42 private ByteBuffer buffer; field in class:SourceChannelTest
51 buffer = ByteBuffer.wrap("bytes".getBytes(ISO8859_1));
91 sink.write(buffer);
154 ByteBuffer[] bufArray = { buffer, positionedBuffer };
164 buffer.position(0);
223 ByteBuffer[] nullBufArray2 = { buffer, nullBuf };
238 sink.write(buffer);
297 ByteBuffer[] bufArray = { buffer, positionedBuffer };
308 buffer.position(0);
403 ByteBuffer[] nullBufArray2 = { buffer, nullBu
[all...]
/libcore/luni/src/main/java/libcore/io/
H A DBlockGuardOs.java204 @Override public int pread(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException { argument
206 return os.pread(fd, buffer, offset);
214 @Override public int pwrite(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException { argument
216 return os.pwrite(fd, buffer, offset);
224 @Override public int read(FileDescriptor fd, ByteBuffer buffer) throws ErrnoException, InterruptedIOException { argument
226 return os.read(fd, buffer);
249 @Override public int recvfrom(FileDescriptor fd, ByteBuffer buffer, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException { argument
251 return os.recvfrom(fd, buffer, flags, srcAddress);
274 @Override public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { argument
276 return os.sendto(fd, buffer, flag
312 write(FileDescriptor fd, ByteBuffer buffer) argument
[all...]
/libcore/luni/src/test/java/libcore/java/util/zip/
H A DZipInputStreamTest.java64 byte[] buffer = new byte[1024];
66 while ((count = in.read(buffer)) != -1) {
67 out.write(buffer, 0, count);
H A DAbstractZipFileTest.java43 * Exercise Inflater's ability to refill the zlib's input buffer. As of this
44 * writing, this buffer's max size is 64KiB compressed bytes. We'll write a
46 * the buffer. http://b/issue?id=2734751
65 private static void replaceBytes(byte[] buffer, byte[] original, byte[] replacement) { argument
69 for(int i=0; i < buffer.length - original.length; i++) {
71 if (buffer[i] == original[0]) {
74 if (buffer[i+j] != original[j]) {
82 buffer[i+j] = replacement[j];
112 byte[] buffer = baos.toByteArray();
113 replaceBytes(buffer, name
[all...]
/libcore/luni/src/test/java/libcore/javax/net/
H A DServerSocketFactoryTest.java125 byte[] buffer = new byte[1024];
127 while ((count = in.read(buffer)) != -1) {
128 out.write(buffer, 0, count);
/libcore/tzdata/tools/src/main/libcore/tzdata/update/tools/
H A DTzDataBundleBuilder.java123 byte[] buffer = new byte[8192];
127 while ((count = fis.read(buffer)) != -1) {
128 baos.write(buffer, 0, count);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
H A DMessageFormatTest.java337 StringBuffer buffer = new StringBuffer();
339 date, date }, buffer, pos);
340 String result = buffer.toString();
341 buffer.setLength(0);
342 buffer.append("abc ");
343 buffer.append(DateFormat.getTimeInstance().format(date));
344 buffer.append(" def ");
345 buffer.append(DateFormat.getDateInstance().format(date));
346 buffer.append(" ghi ");
347 buffer
[all...]
H A DSupport_Format.java39 StringBuffer buffer = new StringBuffer();
41 format.format(object, buffer, pos);
43 // System.out.println(buffer);
47 assertEquals("Test " + count + ": incorrect formatted text", this.text, buffer.toString());
49 assertEquals(text, buffer.toString());
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/
H A DCDATASectionImpl.java72 return buffer.indexOf("]]>") != -1;
/libcore/ojluni/src/main/java/sun/misc/
H A DCharacterEncoder.java53 * chunk of data is referred to as a <i>buffer</i>. Encoded buffers
88 * Encode the prefix for the entire buffer. By default is simply
96 * Encode the suffix for the entire buffer.
124 protected int readFully(InputStream in, byte buffer[]) argument
126 for (int i = 0; i < buffer.length; i++) {
130 buffer[i] = (byte)q;
132 return buffer.length;
173 * Encode the buffer in <i>aBuffer</i> and write the encoded
183 * A 'streamless' version of encode that simply takes a buffer of
184 * bytes and returns a string containing the encoded buffer
[all...]
/libcore/ojluni/src/main/java/sun/security/util/
H A DManifestEntryVerifier.java159 public void update(byte buffer) { argument
163 digests.get(i).update(buffer);
170 public void update(byte buffer[], int off, int len) { argument
174 digests.get(i).update(buffer, off, len);
/libcore/support/src/test/java/tests/support/
H A DSupport_Format.java38 StringBuffer buffer = new StringBuffer();
40 format.format(object, buffer, pos);
42 // System.out.println(buffer);
47 this.text, buffer.toString());
50 buffer.toString());
/libcore/benchmarks/src/benchmarks/regression/
H A DSSLSocketBenchmark.java34 final byte[] buffer = new byte[BUFFER_SIZE]; field in class:SSLSocketBenchmark
88 int n = in.read(buffer);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
H A DInflaterInputStreamTest.java64 int buffer[] = new int[500];
72 buffer[i] = result;
100 int buffer[] = new int[500];
108 buffer[i] = result;
171 int buffer[] = new int[500];
181 buffer[i] = result;
189 orgBuffer[j], buffer[j]);
389 int buffer[] = new int[100];
430 buffer[i] = result;
438 orgBuffer[j], buffer[
[all...]
/libcore/luni/src/main/java/libcore/reflect/
H A DGenericSignatureParser.java93 * and it's set only when a scan is issued at the end of the buffer.
97 char[] buffer; field in class:GenericSignatureParser
107 this.buffer = input.toCharArray();
457 if (pos < buffer.length) {
458 symbol = buffer[pos];
497 char ch = buffer[pos];
507 } while (pos != buffer.length);
/libcore/luni/src/test/java/libcore/java/io/
H A DOldObjectOutputStreamTest.java200 // If there is no buffer then the bytes have already been written.
332 byte[] buffer;
341 buffer = baos.toByteArray();
343 buffer.length >= 4);
346 s = buffer[0];
348 s += ((short) buffer[1] & 0x00ff);
353 s = buffer[2];
355 s += ((short) buffer[3] & 0x00ff);
/libcore/ojluni/src/main/java/java/util/jar/
H A DManifest.java154 StringBuffer buffer = new StringBuffer("Name: ");
160 buffer.append(value);
161 buffer.append("\r\n");
162 make72Safe(buffer);
163 dos.writeBytes(buffer.toString());
196 // Line buffer
404 return -1; // nothing left in buffer

Completed in 708 milliseconds

123456