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

12345678

/libcore/xml/src/main/java/org/kxml2/io/
H A DKXmlParser.java113 * If non-null, the contents of the read buffer must be copied into this
114 * string builder before the read buffer is overwritten. This is used to
142 private char[] buffer = new char[8192]; field in class:KXmlParser
147 * Track the number of newlines and columns preceding the current buffer. To
148 * compute the line and column of a position in the buffer, compute the line
149 * and column in the buffer and add the preceding values.
482 result.append(buffer, start, position - start);
492 // TODO: replace with Arrays.equals(buffer, position, delimiter, 0, delimiter.length)
495 if (buffer[position + i] != delimiter[i]) {
510 return stringPool.get(buffer, star
2145 private final char[] buffer; field in class:KXmlParser.ContentSource
2148 ContentSource(ContentSource next, char[] buffer, int position, int limit) argument
[all...]
/libcore/luni/src/main/java/java/io/
H A DFilterInputStream.java117 @Override public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument
118 return in.read(buffer, byteOffset, byteCount);
H A DFilterReader.java120 * in the byte array {@code buffer} starting at {@code offset}. Returns the
128 public int read(char[] buffer, int offset, int count) throws IOException { argument
130 return in.read(buffer, offset, count);
H A DFilterWriter.java77 * Writes {@code count} characters from the char array {@code buffer}
80 * @param buffer
81 * the buffer to write.
83 * the index of the first character in {@code buffer} to write.
85 * the number of characters in {@code buffer} to write.
90 public void write(char[] buffer, int offset, int count) throws IOException { argument
92 out.write(buffer, offset, count);
H A DPipedOutputStream.java118 * Writes {@code count} bytes from the byte array {@code buffer} starting at
126 * @param buffer
127 * the buffer to write.
129 * the index of the first byte in {@code buffer} to write.
131 * the number of bytes from {@code buffer} to write to this
135 * offset + count} is bigger than the length of {@code buffer}.
146 public void write(byte[] buffer, int offset, int count) throws IOException { argument
147 super.write(buffer, offset, count);
H A DByteArrayInputStream.java144 @Override public synchronized int read(byte[] buffer, int byteOffset, int byteCount) { argument
145 Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount);
156 System.arraycopy(this.buf, pos, buffer, byteOffset, copylen);
H A DByteArrayOutputStream.java86 /* Can the buffer handle @i more bytes, if not expand it */
179 * Writes {@code count} bytes from the byte array {@code buffer} starting at
182 * @param buffer
183 * the buffer to be written.
185 * the initial position in {@code buffer} to retrieve bytes.
187 * the number of bytes of {@code buffer} to write.
189 * if {@code buffer} is {@code null}.
193 * {@code buffer}.
196 public synchronized void write(byte[] buffer, int offset, int len) { argument
197 Arrays.checkOffsetAndCount(buffer
[all...]
H A DLineNumberInputStream.java142 * them in the byte array {@code buffer} starting at {@code byteOffset}.
152 * if {@code byteOffset < 0 || byteCount < 0 || byteOffset + byteCount > buffer.length}.
156 * if {@code buffer == null}.
159 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument
160 Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount);
174 buffer[byteOffset + i] = (byte) currentChar;
H A DLineNumberReader.java24 * internal buffer for its data. The size of the buffer defaults to 8 KB.
38 * buffer gets the default size (8 KB).
49 * the internal buffer is specified by the parameter {@code size}.
54 * the size of the buffer to allocate.
136 * them in the character array {@code buffer} starting at {@code offset}.
148 public int read(char[] buffer, int offset, int count) throws IOException { argument
150 int read = super.read(buffer, offset, count);
155 char ch = buffer[offset + i];
H A DSequenceInputStream.java150 * stores them in the byte array {@code buffer} starting at {@code byteOffset}.
166 * if {@code byteOffset < 0 || byteCount < 0 || byteOffset + byteCount > buffer.length}.
170 * if {@code buffer == null}.
173 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument
177 Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount);
179 int result = in.read(buffer, byteOffset, byteCount);
H A DStringReader.java135 * them at {@code offset} in the character array {@code buffer}. Returns the
140 if {@code offset < 0 || count < 0 || offset + count > buffer.length}.
145 public int read(char[] buffer, int offset, int count) throws IOException { argument
148 Arrays.checkOffsetAndCount(buffer.length, offset, count);
156 str.getChars(pos, end, buffer, offset);
H A DBufferedWriter.java26 * requests can be satisfied by accessing the buffer alone. The drawback is that
27 * some extra space is required to hold the buffer and that copying takes place
28 * when filling that buffer, but this is usually outweighed by the performance
48 * Constructs a new {@code BufferedWriter}, providing {@code out} with a buffer
51 * @param out the {@code Writer} the buffer writes to.
59 * of buffer.
61 * @param out the {@code OutputStream} the buffer writes to.
62 * @param size the size of buffer in chars.
75 * Closes this writer. The contents of the buffer are flushed, the target
76 * writer is closed, and the buffer i
184 write(char[] buffer, int offset, int count) argument
[all...]
H A DCharArrayReader.java29 * The buffer for characters.
34 * The current buffer position.
44 * The ending index of the buffer.
50 * the reader is set to the length of the buffer and the object to to read
64 * read the buffer is set to {@code offset}.
79 * of offset and length, it doesn't consider buffer's length. And to be
188 * stores them at {@code offset} in the character array {@code buffer}.
193 * if {@code offset < 0 || count < 0 || offset + count > buffer.length}.
198 public int read(char[] buffer, int offset, int count) throws IOException { argument
199 Arrays.checkOffsetAndCount(buffer
[all...]
/libcore/luni/src/test/java/libcore/java/net/
H A DOldAndroidDatagramTest.java46 byte[] buffer = new byte[256]; field in class:OldAndroidDatagramTest.Reflector
58 packet.setLength(buffer.length);
90 packet = new DatagramPacket(buffer, buffer.length);
128 byte[] buffer = new byte[256];
130 DatagramPacket packet = new DatagramPacket(buffer, buffer.length);
149 packet.setLength(buffer.length);
/libcore/benchmarks/src/benchmarks/
H A DBufferedZipFileBenchmark.java59 byte[] buffer = new byte[readSize];
60 while (in.read(buffer) != -1) {
72 byte[] buffer = new byte[readSize];
73 while (in.read(buffer) != -1) {
/libcore/luni/src/main/java/java/text/
H A DFormat.java98 * Appends the specified object to the specified string buffer using the
108 * @param buffer
109 * the string buffer where the formatted string is appended to.
113 * @return the string buffer.
117 public abstract StringBuffer format(Object object, StringBuffer buffer, argument
178 StringBuffer buffer, char stop) {
188 buffer.append('\'');
196 buffer.append(ch);
205 StringBuffer buffer, char stop, char start) {
225 buffer
177 upTo(String string, ParsePosition position, StringBuffer buffer, char stop) argument
204 upToWithQuotes(String string, ParsePosition position, StringBuffer buffer, char stop, char start) argument
[all...]
H A DSimpleDateFormat.java479 StringBuffer buffer = new StringBuffer();
483 formatImpl(date, buffer, null, fields);
485 // create and AttributedString with the formatted buffer
486 AttributedString as = new AttributedString(buffer.toString());
511 * @param buffer
523 private StringBuffer formatImpl(Date date, StringBuffer buffer, argument
538 append(buffer, field, fields, (char) last, count);
542 buffer.append('\'');
556 append(buffer, field, fields, (char) last, count);
563 append(buffer, fiel
576 append(StringBuffer buffer, FieldPosition position, List<FieldPosition> fields, char format, int count) argument
705 appendDayOfWeek(StringBuffer buffer, int count, boolean standAlone) argument
719 appendMonth(StringBuffer buffer, int count, boolean standAlone) argument
747 appendTimeZone(StringBuffer buffer, int count, boolean generalTimeZone) argument
764 appendNumericTimeZone(StringBuffer buffer, int count, boolean generalTimeZone) argument
772 appendMilliseconds(StringBuffer buffer, int count, int value) argument
790 appendNumber(StringBuffer buffer, int count, int value) argument
827 format(Date date, StringBuffer buffer, FieldPosition fieldPos) argument
[all...]
H A DDecimalFormat.java668 private void checkBufferAndFieldPosition(StringBuffer buffer, FieldPosition position) { argument
669 if (buffer == null) {
670 throw new NullPointerException("buffer == null");
678 public StringBuffer format(double value, StringBuffer buffer, FieldPosition position) { argument
679 checkBufferAndFieldPosition(buffer, position);
680 buffer.append(ndf.formatDouble(value, position));
681 return buffer;
685 public StringBuffer format(long value, StringBuffer buffer, FieldPosition position) { argument
686 checkBufferAndFieldPosition(buffer, position);
687 buffer
692 format(Object number, StringBuffer buffer, FieldPosition position) argument
[all...]
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/
H A DCommentImpl.java53 return buffer.indexOf("--") != -1;
/libcore/luni/src/main/java/java/util/zip/
H A DGZIPOutputStream.java68 * the given stream with the given internal buffer size.
76 * the given stream with the given internal buffer size and
105 * Write up to nbytes of data from the given buffer, starting at offset off,
109 public void write(byte[] buffer, int off, int nbytes) throws IOException { argument
110 super.write(buffer, off, nbytes);
111 crc.update(buffer, off, nbytes);
H A DDeflaterInputStream.java43 * implementation-defined default internal buffer size. {@code in} is a source of
54 * implementation-defined default internal buffer size. {@code in} is a source of
66 * given internal buffer size. {@code in} is a source of
71 * @param bufferSize the length in bytes of the internal buffer
109 * Reads up to {@code byteCount} bytes of compressed data into a byte buffer. The result will be bytes of compressed
114 @Override public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { argument
116 Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount);
136 int bytesDeflated = def.deflate(buffer, byteOffset + count, byteCount - count);
/libcore/luni/src/test/java/libcore/java/io/
H A DFileInputStreamTest.java46 byte[] buffer = new byte[TOTAL_SIZE];
47 for (int i = 0; i < buffer.length; ++i) {
48 buffer[i] = (byte) i;
50 fos.write(buffer);
62 byte buffer[] = new byte[count];
63 assertEquals(count, is.read(buffer));
65 assertEquals((byte) (i + start), buffer[i]);
/libcore/luni/src/test/java/libcore/java/nio/channels/
H A DFileIOInterruptTest.java104 byte[] buffer = new byte[10];
106 fis.read(buffer);
144 byte[] buffer = new byte[10];
148 fos.write(buffer);
197 ByteBuffer buffer = ByteBuffer.allocateDirect(10);
200 fileInputChannel.read(buffer);
203 fileInputChannel.read(new ByteBuffer[] { buffer, buffer2});
230 ByteBuffer buffer = ByteBuffer.allocateDirect(10);
233 fileInputChannel.read(buffer);
236 fileInputChannel.read(new ByteBuffer[] { buffer, buffer
[all...]
/libcore/luni/src/test/java/libcore/java/util/zip/
H A DOldAndroidZipStressTest.java80 byte[] buffer = new byte[512];
87 int j = stream.read(buffer);
89 j = stream.read(buffer);
99 byte[] buffer = new byte[512];
106 int j = stream.read(buffer);
108 j = stream.read(buffer);
/libcore/luni/src/main/java/java/nio/channels/
H A DFileChannel.java140 * mapped byte buffer may not be committed.
266 * @return the mapped byte buffer.
315 * Reads bytes from this file channel into the given buffer.
318 * bytes in the buffer when the method is invoked. The bytes will be copied
319 * into the buffer starting at the buffer's current position.
324 * Upon completion, the buffer's position is set to the end of the bytes
325 * that have been read. The buffer's limit is not changed.
327 * @param buffer
328 * the byte buffer t
343 read(ByteBuffer buffer) argument
380 read(ByteBuffer buffer, long position) argument
681 write(ByteBuffer buffer, long position) argument
[all...]

Completed in 1463 milliseconds

12345678