Searched refs:count (Results 1 - 25 of 200) sorted by relevance

12345678

/libcore/luni/src/main/java/java/io/
H A DByteArrayOutputStream.java39 protected int count; field in class:ByteArrayOutputStream
87 if (count + i <= buf.length) {
91 byte[] newbuf = new byte[(count + i) * 2];
92 System.arraycopy(buf, 0, newbuf, 0, count);
102 count = 0;
111 return count;
122 byte[] newArray = new byte[count];
123 System.arraycopy(buf, 0, newArray, 0, count);
137 return new String(buf, 0, count);
175 return new String(buf, 0, count, charsetNam
[all...]
H A DCharArrayWriter.java40 protected int count; field in class:CharArrayWriter
80 if (count + i <= buf.length) {
84 int newLen = Math.max(2 * buf.length, count + i);
86 System.arraycopy(buf, 0, newbuf, 0, count);
105 count = 0;
118 return count;
131 char[] result = new char[count];
132 System.arraycopy(buf, 0, result, 0, count);
147 return new String(buf, 0, count);
152 * Writes {@code count} character
203 write(String str, int offset, int count) argument
[all...]
H A DStringReader.java35 private int count; field in class:StringReader
47 this.count = str.length();
126 if (pos != count) {
134 * Reads up to {@code count} characters from the source string and stores
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);
149 if (count == 0) {
152 if (pos == this.count) {
[all...]
H A DCharArrayReader.java46 protected int count; field in class:CharArrayReader
58 this.count = buf.length;
92 this.count = offset + length < bufferLength ? length : bufferLength;
179 if (pos == count) {
187 * Reads up to {@code count} characters from this CharArrayReader and
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.length, offset, count);
202 if (pos < this.count) {
[all...]
H A DBufferedOutputStream.java47 protected int count; field in class:BufferedOutputStream
96 * Writes {@code count} bytes from the byte array {@code buffer} starting at
118 * If offset or count is outside of bounds.
138 if (length > (internalBuffer.length - count)) {
142 System.arraycopy(buffer, offset, internalBuffer, count, length);
143 count += length;
161 * copied into the buffer and the count incremented. Otherwise, the buffer
173 if (count == buf.length) {
174 out.write(buf, 0, count);
175 count
[all...]
H A DByteArrayInputStream.java48 protected int count; field in class:ByteArrayInputStream
60 this.count = buf.length;
79 count = offset + length > buf.length ? buf.length : offset + length;
85 * @return {@code count - pos}
89 return count - pos;
141 return pos < count ? buf[pos++] & 0xFF : -1;
148 if (this.pos >= this.count) {
155 int copylen = this.count - pos < byteCount ? this.count - pos : byteCount;
187 pos = this.count
[all...]
H A DStringBufferInputStream.java38 protected int count; field in class:StringBufferInputStream
60 count = str.length();
65 return count - pos;
78 return pos < count ? buffer.charAt(pos++) & 0xFF : -1;
90 int copylen = count - pos < byteCount ? count - pos : byteCount;
121 if (this.count - pos < charCount) {
122 numskipped = this.count - pos;
123 pos = this.count;
H A DBufferedWriter.java165 * Writes {@code count} characters starting at {@code offset} in
166 * {@code buffer} to this writer. If {@code count} is greater than this
174 * @param count
177 * if {@code offset < 0} or {@code count < 0}, or if
178 * {@code offset + count} is greater than the size of
184 public void write(char[] buffer, int offset, int count) throws IOException { argument
190 Arrays.checkOffsetAndCount(buffer.length, offset, count);
191 if (pos == 0 && count >= this.buf.length) {
192 out.write(buffer, offset, count);
196 if (count < availabl
264 write(String str, int offset, int count) argument
[all...]
H A DPipedReader.java202 * Reads up to {@code count} characters from this reader and stores them
216 * if {@code offset < 0 || count < 0 || offset + count > buffer.length}.
224 @Override public synchronized int read(char[] buffer, int offset, int count) throws IOException { argument
231 Arrays.checkOffsetAndCount(buffer.length, offset, count);
232 if (count == 0) {
263 copyLength = count > this.buffer.length - out ? this.buffer.length - out : count;
280 if (copyLength == count || in == -1) {
286 copyLength = in - out > count
383 receive(char[] chars, int offset, int count) argument
[all...]
H A DWriter.java98 * Writes {@code count} characters starting at {@code offset} in {@code buf}
105 * @param count
108 * if {@code offset < 0} or {@code count < 0}, or if {@code
109 * offset + count} is greater than the size of {@code buf}.
113 public abstract void write(char[] buf, int offset, int count) throws IOException; argument
145 * Writes {@code count} characters from {@code str} starting at {@code
152 * @param count
157 * if {@code offset < 0} or {@code count < 0}, or if {@code
158 * offset + count} is greater than the length of {@code str}.
160 public void write(String str, int offset, int count) throw argument
[all...]
H A DOutputStream.java86 * Writes {@code count} bytes from the byte array {@code buffer} starting at
93 * @param count
99 * if {@code offset < 0} or {@code count < 0}, or if
100 * {@code offset + count} is bigger than the length of
103 public void write(byte[] buffer, int offset, int count) throws IOException { argument
104 Arrays.checkOffsetAndCount(buffer.length, offset, count);
105 for (int i = offset; i < offset + count; i++) {
H A DFilterWriter.java77 * Writes {@code count} characters from the char array {@code buffer}
84 * @param count
90 public void write(char[] buffer, int offset, int count) throws IOException { argument
92 out.write(buffer, offset, count);
113 * Writes {@code count} characters from the string {@code str} starting at
121 * @param count
127 public void write(String str, int offset, int count) throws IOException { argument
129 out.write(str, offset, count);
/libcore/support/src/test/java/tests/support/
H A DSupport_StringReader.java30 private int count; field in class:Support_StringReader
43 this.count = str.length();
121 if (pos != count) {
131 * Reads at most <code>count</code> characters from this StringReader and
140 * @param count
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) {
154 if (pos == this.count) {
157 int end = pos + count > thi
228 skip(long count) argument
[all...]
/libcore/dalvik/src/main/java/dalvik/system/profiler/
H A DDalvikThreadSampler.java40 int count = VMStack.fillStackTraceElements(thread, mutableStackTraceElements[depth]);
41 if (count == 0) {
44 if (count < depth) {
46 mutableStackTraceElements[count], 0,
47 count);
49 return mutableStackTraceElements[count];
/libcore/dex/src/main/java/com/android/dex/
H A DLeb128.java41 int count = 0;
45 count++;
48 return count + 1;
62 int count = 0;
72 count++;
75 return count;
84 int count = 0;
89 result |= (cur & 0x7f) << (count * 7);
91 count++;
92 } while (((cur & 0x80) == 0x80) && count <
[all...]
/libcore/luni/src/main/java/java/lang/
H A DAbstractStringBuilder.java39 private int count; field in class:AbstractStringBuilder
66 throw new InvalidObjectException("count out of range");
71 count = len;
86 count = string.length();
88 value = new char[count + INITIAL_CAPACITY];
89 string._getChars(0, count, value, 0);
95 System.arraycopy(value, 0, newData, 0, count);
101 int newCount = count + 4;
105 value[count++] = 'n';
106 value[count
[all...]
H A DStringIndexOutOfBoundsException.java78 public StringIndexOutOfBoundsException(String s, int offset, int count) { argument
79 this(s.length(), offset, count);
87 int count) {
89 + "; regionLength=" + count);
86 StringIndexOutOfBoundsException(int sourceLength, int offset, int count) argument
H A DArrayIndexOutOfBoundsException.java71 int count) {
73 + "; regionLength=" + count);
70 ArrayIndexOutOfBoundsException(int sourceLength, int offset, int count) argument
/libcore/luni/src/main/java/org/w3c/dom/
H A DCharacterData.java69 * @param count The number of 16-bit units to extract.
71 * <code>count</code> exceeds the <code>length</code>, then all 16-bit
76 * <code>data</code>, or if the specified <code>count</code> is
82 int count)
114 * @param count The number of 16-bit units to delete. If the sum of
115 * <code>offset</code> and <code>count</code> exceeds
121 * <code>data</code>, or if the specified <code>count</code> is
126 int count)
133 * @param count The number of 16-bit units to replace. If the sum of
134 * <code>offset</code> and <code>count</cod
81 substringData(int offset, int count) argument
125 deleteData(int offset, int count) argument
148 replaceData(int offset, int count, String arg) argument
[all...]
/libcore/libdvm/src/main/java/java/lang/
H A DString.java110 private final int count; field in class:String
120 count = 0;
129 value = new char[s.count + 1];
130 count = s.count + 1;
131 System.arraycopy(s.value, s.offset, value, 0, s.count);
132 value[s.count] = c;
192 this.count = byteCount;
194 for (int i = 0; i < count; i++) {
250 // We inline UTF-8, ISO-8859-1, and US-ASCII decoders for speed and because 'count' an
515 String(int[] codePoints, int offset, int count) argument
591 failedBoundsCheck(int arrayLength, int offset, int count) argument
[all...]
/libcore/luni/src/main/java/java/util/concurrent/
H A DCountDownLatch.java14 * <p>A {@code CountDownLatch} is initialized with a given <em>count</em>.
15 * The {@link #await await} methods block until the current count reaches
19 * -- the count cannot be reset. If you need a version that resets the
20 * count, consider using a {@link CyclicBarrier}.
24 * {@code CountDownLatch} initialized with a count of one serves as a
33 * the count to reach zero before proceeding, it simply prevents any
85 * count down in this way, instead use a {@link CyclicBarrier}.)
117 * <p>Memory consistency effects: Until the count reaches
130 * Uses AQS state to represent count.
135 Sync(int count) { argument
169 CountDownLatch(int count) argument
[all...]
/libcore/luni/src/main/java/java/nio/charset/
H A DModifiedUtf8.java36 int count = 0, s = 0, a;
37 while (count < utfSize) {
38 if ((out[s] = (char) in[offset + count++]) < '\u0080') {
41 if (count >= utfSize) {
42 throw new UTFDataFormatException("bad second byte at " + count);
44 int b = in[offset + count++];
46 throw new UTFDataFormatException("bad second byte at " + (count - 1));
50 if (count + 1 >= utfSize) {
51 throw new UTFDataFormatException("bad third byte at " + (count + 1));
53 int b = in[offset + count
[all...]
/libcore/libart/src/main/java/java/lang/
H A DString.java110 private final int count; field in class:String
120 count = 0;
180 this.count = byteCount;
182 for (int i = 0; i < count; i++) {
238 // We inline UTF-8, ISO-8859-1, and US-ASCII decoders for speed and because 'count' and
265 // Range: U-00000080 - U-000007FF (count == 1)
266 // Range: U-00000800 - U-0000FFFF (count == 2)
267 // Range: U-00010000 - U-001FFFFF (count == 3)
268 // Range: U-00200000 - U-03FFFFFF (count == 4)
269 // Range: U-04000000 - U-7FFFFFFF (count
463 String(int[] codePoints, int offset, int count) argument
522 failedBoundsCheck(int arrayLength, int offset, int count) argument
[all...]
/libcore/luni/src/test/java/libcore/java/util/zip/
H A DGZIPInputStreamTest.java52 long count;
54 count = in.skip(Long.MAX_VALUE);
55 totalSkipped += count;
56 } while (count > 0);
66 int count;
67 while ((count = in.read(buffer)) != -1) {
68 out.write(buffer, 0, count);
/libcore/luni/src/main/java/java/sql/
H A DArray.java39 * starting at a particular {@code index} and comprising up to {@code count}
45 * @param count
51 public Object getArray(long index, int count) throws SQLException; argument
55 * starting at a particular {@code index} and comprising up to {@code count}
61 * @param count
70 public Object getArray(long index, int count, Map<String, Class<?>> map) argument
117 * beginning at a particular index and comprising up to {@code count}
123 * @param count
129 public ResultSet getResultSet(long index, int count) throws SQLException; argument
133 * beginning at a particular index and comprising up to {@code count}
149 getResultSet(long index, int count, Map<String, Class<?>> map) argument
[all...]

Completed in 630 milliseconds

12345678