/libcore/luni/src/main/java/java/io/ |
H A D | ByteArrayOutputStream.java | 39 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 D | CharArrayWriter.java | 40 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 D | StringReader.java | 35 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 D | CharArrayReader.java | 46 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 D | BufferedOutputStream.java | 47 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 D | ByteArrayInputStream.java | 48 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 D | StringBufferInputStream.java | 38 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 D | BufferedWriter.java | 165 * 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 D | PipedReader.java | 202 * 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 D | Writer.java | 98 * 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 D | OutputStream.java | 86 * 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 D | FilterWriter.java | 77 * 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 D | Support_StringReader.java | 30 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...] |
H A D | Streams.java | 39 int count; 40 while ((count = source.read(buffer)) != -1) { 41 out.write(buffer, 0, count); 52 int count; 53 while ((count = fileReader.read(buffer)) != -1) { 54 out.write(buffer, 0, count);
|
H A D | ThrowingReader.java | 45 @Override public int read(char[] buf, int offset, int count) argument 50 count = Math.min(count, (throwAt - total)); 53 int returned = super.read(buf, offset, count);
|
/libcore/dalvik/src/main/java/dalvik/system/profiler/ |
H A D | DalvikThreadSampler.java | 40 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/luni/src/main/java/libcore/util/ |
H A D | CountingOutputStream.java | 24 * An output stream that keeps count of the number of bytes written to it. 31 private long count; field in class:CountingOutputStream 41 count = 0; 47 count += length; 53 count++; 57 return count;
|
/libcore/dex/src/main/java/com/android/dex/ |
H A D | Leb128.java | 41 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/libart/src/main/java/java/lang/ |
H A D | AbstractStringBuilder.java | 40 private int count; field in class:AbstractStringBuilder 67 throw new InvalidObjectException("count out of range"); 72 count = len; 87 count = string.length(); 89 value = new char[count + INITIAL_CAPACITY]; 90 string.getCharsNoCheck(0, count, value, 0); 96 System.arraycopy(value, 0, newData, 0, count); 102 int newCount = count + 4; 106 value[count++] = 'n'; 107 value[count [all...] |
/libcore/luni/src/main/java/org/w3c/dom/ |
H A D | CharacterData.java | 69 * @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/luni/src/main/java/java/lang/ |
H A D | StringIndexOutOfBoundsException.java | 78 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 D | ArrayIndexOutOfBoundsException.java | 71 int count) { 73 + "; regionLength=" + count); 70 ArrayIndexOutOfBoundsException(int sourceLength, int offset, int count) argument
|
/libcore/luni/src/main/java/java/util/concurrent/ |
H A D | CountDownLatch.java | 15 * <p>A {@code CountDownLatch} is initialized with a given <em>count</em>. 16 * The {@link #await await} methods block until the current count reaches 20 * -- the count cannot be reset. If you need a version that resets the 21 * count, consider using a {@link CyclicBarrier}. 25 * {@code CountDownLatch} initialized with a count of one serves as a 34 * the count to reach zero before proceeding, it simply prevents any 86 * count down in this way, instead use a {@link CyclicBarrier}.) 118 * <p>Memory consistency effects: Until the count reaches 131 * Uses AQS state to represent count. 136 Sync(int count) { argument 170 CountDownLatch(int count) argument [all...] |
/libcore/luni/src/main/java/java/nio/charset/ |
H A D | ModifiedUtf8.java | 36 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/luni/src/main/java/java/sql/ |
H A D | Array.java | 39 * 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...] |