Searched refs:buffer (Results 76 - 100 of 148) sorted by relevance

123456

/libcore/ojluni/src/main/java/java/text/
H A DSimpleDateFormat.java902 * Encodes the given tag and length and puts encoded char(s) into buffer.
904 private static void encode(int tag, int length, StringBuilder buffer) { argument
909 buffer.append((char)(tag << 8 | length));
911 buffer.append((char)((tag << 8) | 0xff));
912 buffer.append((char)(length >>> 16));
913 buffer.append((char)(length & 0xffff));
1157 FieldDelegate delegate, StringBuffer buffer,
1162 int beginOffset = buffer.length();
1207 zeroPaddingNumber(value, count, maxIntCount, buffer);
1209 zeroPaddingNumber(value, 2, 2, buffer);
1156 subFormat(int patternCharIndex, int count, FieldDelegate delegate, StringBuffer buffer, boolean useDateFormatSymbols) argument
1426 formatMonth(int count, int value, int maxIntCount, StringBuffer buffer, boolean useDateFormatSymbols, boolean standalone) argument
1461 zeroPaddingNumber(int value, int minDigits, int maxDigits, StringBuffer buffer) argument
[all...]
/libcore/luni/src/test/java/libcore/java/util/zip/
H A DAbstractZipFileTest.java48 * Exercise Inflater's ability to refill the zlib's input buffer. As of this
49 * writing, this buffer's max size is 64KiB compressed bytes. We'll write a
51 * the buffer. http://b/issue?id=2734751
70 private static void replaceBytes(byte[] buffer, byte[] original, byte[] replacement) { argument
74 for(int i=0; i < buffer.length - original.length; i++) {
76 if (buffer[i] == original[0]) {
79 if (buffer[i+j] != original[j]) {
87 buffer[i+j] = replacement[j];
117 byte[] buffer = baos.toByteArray();
118 replaceBytes(buffer, name
[all...]
H A DZipInputStreamTest.java59 byte[] buffer = new byte[1024];
61 while ((count = in.read(buffer)) != -1) {
62 out.write(buffer, 0, count);
/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
/libcore/benchmarks/src/benchmarks/
H A DXmlParseBenchmark.java77 byte[] buffer = new byte[1024];
78 while ((count = fileIn.read(buffer)) != -1) {
79 bytesOut.write(buffer, 0, count);
/libcore/benchmarks/src/benchmarks/regression/
H A DParseBenchmark.java111 char[] buffer = new char[8192];
114 while ((count = reader.read(buffer)) != -1) {
115 writer.write(buffer, 0, count);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DLineNumberReaderTest.java121 byte[] buffer = new byte[] { '\r', '\n' };
123 new ByteArrayInputStream(buffer), "UTF-8"));
127 new ByteArrayInputStream(buffer), "UTF-8"));
H A DOutputStreamTesterTest.java128 byte[] buffer = new byte[256];
130 while ((count = in.read(buffer)) != -1) {
131 bytes.write(buffer, 0, count);
H A DWriterTesterTest.java121 char[] buffer = new char[256];
123 while ((count = in.read(buffer)) != -1) {
124 chars.write(buffer, 0, count);
/libcore/luni/src/main/java/libcore/io/
H A DBlockGuardOs.java227 @Override public int pread(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException { argument
229 return os.pread(fd, buffer, offset);
237 @Override public int pwrite(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException { argument
239 return os.pwrite(fd, buffer, offset);
247 @Override public int read(FileDescriptor fd, ByteBuffer buffer) throws ErrnoException, InterruptedIOException { argument
249 return os.read(fd, buffer);
272 @Override public int recvfrom(FileDescriptor fd, ByteBuffer buffer, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException { argument
274 return os.recvfrom(fd, buffer, flags, srcAddress);
297 @Override public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { argument
299 return os.sendto(fd, buffer, flag
341 write(FileDescriptor fd, ByteBuffer buffer) argument
[all...]
H A DOs.java129 public int pread(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException; argument
131 public int pwrite(FileDescriptor fd, ByteBuffer buffer, long offset) throws ErrnoException, InterruptedIOException; argument
133 public int read(FileDescriptor fd, ByteBuffer buffer) throws ErrnoException, InterruptedIOException; argument
138 public int recvfrom(FileDescriptor fd, ByteBuffer buffer, int flags, InetSocketAddress srcAddress) throws ErrnoException, SocketException; argument
143 public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException; argument
181 public int write(FileDescriptor fd, ByteBuffer buffer) throws ErrnoException, InterruptedIOException; argument
/libcore/support/src/test/java/org/apache/harmony/testframework/
H A DCharWrapperTester.java91 return decode(delegate.buffer.toString().toCharArray());
194 private final StringBuilder buffer = new StringBuilder(); field in class:CharWrapperTester.ClosableStringWriter
211 buffer.append(buf, offset, count);
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/
H A DTextImpl.java168 previousText.buffer.append(buffer);
/libcore/ojluni/src/main/java/sun/misc/
H A DCharacterDecoder.java52 * Of course in the simplest encoding schemes, the buffer has no
57 * chunk of data is referred to as a <i>buffer</i>. Encoded buffers
96 /** decode the beginning of the buffer, by default this is a NOP. */
99 /** decode the buffer suffix, again by default it is a NOP. */
133 protected int readFully(InputStream in, byte buffer[], int offset, int len) argument
139 buffer[i+offset] = (byte)q;
183 * buffer and returns a byte array containing the data.
199 * Decode the contents of the inputstream into a buffer.
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/
H A DTestData.java88 public static <T> OfRef<T> ofSpinedBuffer(String name, SpinedBuffer<T> buffer) { argument
89 return new AbstractTestData.RefTestData<>(name, buffer,
118 public static OfInt ofSpinedBuffer(String name, SpinedBuffer.OfInt buffer) { argument
119 return new AbstractTestData.IntTestData<>(name, buffer,
149 public static OfLong ofSpinedBuffer(String name, SpinedBuffer.OfLong buffer) { argument
150 return new AbstractTestData.LongTestData<>(name, buffer,
180 public static OfDouble ofSpinedBuffer(String name, SpinedBuffer.OfDouble buffer) { argument
181 return new AbstractTestData.DoubleTestData<>(name, buffer,
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
H A DTestData.java89 public static <T> OfRef<T> ofSpinedBuffer(String name, SpinedBuffer<T> buffer) { argument
90 return new AbstractTestData.RefTestData<>(name, buffer,
119 public static OfInt ofSpinedBuffer(String name, SpinedBuffer.OfInt buffer) { argument
120 return new AbstractTestData.IntTestData<>(name, buffer,
150 public static OfLong ofSpinedBuffer(String name, SpinedBuffer.OfLong buffer) { argument
151 return new AbstractTestData.LongTestData<>(name, buffer,
181 public static OfDouble ofSpinedBuffer(String name, SpinedBuffer.OfDouble buffer) { argument
182 return new AbstractTestData.DoubleTestData<>(name, buffer,
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/io/
H A DObjectInputStreamTest.java385 private void fillStreamHeader(byte[] buffer) { argument
389 if (buffer.length < 4) {
390 throw new IllegalArgumentException("The buffer's minimal length must be 4.");
393 // Initialize the buffer with the correct header for object streams
394 buffer[0] = (byte) (magic >> 8);
395 buffer[1] = (byte) magic;
396 buffer[2] = (byte) (version >> 8);
397 buffer[3] = (byte) (version);
401 byte[] buffer = new byte[4];
403 // Initialize the buffer wit
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
H A DGZIPInputStreamTest.java165 // the size of the InflaterStream internal buffer
284 byte[] buffer = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
291 gout.write(buffer);
299 buffer = new byte[100];
300 gis.read(buffer);
H A DZipInputStreamTest.java169 public int read(byte[] buffer, int offset, int count) throws IOException {
170 return super.read(buffer, offset, 1); // one byte at a time
174 public int read(byte[] buffer) throws IOException {
175 return super.read(buffer, 0, 1); // one byte at a time
/libcore/support/src/test/java/libcore/java/io/
H A DNullPrintStream.java60 public void write(byte[] buffer, int offset, int length) {} argument
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
H A DServerSocketChannelTest.java525 ByteBuffer buffer; field in class:ServerSocketChannelTest.WriteChannelThread
528 public WriteChannelThread(SocketChannel channel, ByteBuffer buffer) { argument
530 this.buffer = buffer;
535 channel.write(buffer);
593 byte[] buffer; field in class:ServerSocketChannelTest.WriteSocketThread
596 public WriteSocketThread(Socket socket, byte[] buffer) { argument
598 this.buffer = buffer;
604 out.write(buffer);
[all...]
/libcore/ojluni/src/main/java/sun/security/pkcs/
H A DSignerInfo.java382 byte[] buffer = new byte[4096];
384 while ((read = inputStream.read(buffer)) != -1) {
385 md.update(buffer, 0 , read);
480 byte[] buffer = new byte[4096];
482 while ((read = dataSigned.read(buffer)) != -1) {
483 sig.update(buffer, 0 , read);
/libcore/support/src/test/java/tests/http/
H A DMockWebServer.java436 byte[] buffer = new byte[1024];
438 int count = in.read(buffer, 0, Math.min(buffer.length, length));
442 out.write(buffer, 0, count);
478 @Override public void write(byte[] buffer, int offset, int len) { argument
480 super.write(buffer, offset, Math.min(len, bodyLimit - count));
/libcore/ojluni/src/main/java/java/util/stream/
H A DStreamSpliterators.java88 * leading to the buffer. Used during partial traversal.
99 /** Next element to consume from the buffer, used during partial traversal */
103 T_BUFFER buffer; field in class:StreamSpliterators.AbstractWrappingSpliterator
107 * If doing a partial traversal, there may be still elements in buffer.
149 * setting up the buffer if needed
150 * @return whether there are elements to consume from the buffer
153 if (buffer == null) {
165 boolean hasNext = nextToConsume < buffer.count();
168 buffer.clear();
182 * Initializes buffer, sin
[all...]
/libcore/ojluni/src/main/java/java/util/
H A DCalendar.java3338 StringBuilder buffer = new StringBuilder(800);
3339 buffer.append(getClass().getName()).append('[');
3340 appendValue(buffer, "time", isTimeSet, time);
3341 buffer.append(",areFieldsSet=").append(areFieldsSet);
3342 buffer.append(",areAllFieldsSet=").append(areAllFieldsSet);
3343 buffer.append(",lenient=").append(lenient);
3344 buffer.append(",zone=").append(zone);
3345 appendValue(buffer, ",firstDayOfWeek", true, (long) firstDayOfWeek);
3346 appendValue(buffer, ",minimalDaysInFirstWeek", true, (long) minimalDaysInFirstWeek);
3348 buffer
[all...]

Completed in 1213 milliseconds

123456