/libcore/ojluni/src/test/java/lang/invoke/ |
D | MethodHandlesAsCollectorTest.java | 63 for (int pos = 0; pos <= nargs; pos++) { in testAsCollector0() 64 if (CAN_TEST_LIGHTLY && pos > 2 && pos < nargs-2) continue; in testAsCollector0() 65 if (nargs > 10 && pos > 4 && pos < nargs-4 && pos % 10 != 3) in testAsCollector0() 67 testAsCollector(argType, pos, nargs); in testAsCollector0() 75 public void testAsCollector(Class<?> argType, int pos, int nargs) throws Throwable { in testAsCollector() argument 83 Object[] collectedArgs = Arrays.copyOfRange(args, 0, pos+1); in testAsCollector() 84 collectedArgs[pos] = Arrays.copyOfRange(args, pos, args.length); in testAsCollector() 86 MethodHandle target = varargsArray(pos+1); in testAsCollector() 87 target = changeArgTypes(target, 0, pos, argType); in testAsCollector() 88 target = changeArgTypes(target, pos, pos+1, Object[].class); in testAsCollector() [all …]
|
/libcore/ojluni/src/main/java/java/text/ |
D | StringCharacterIterator.java | 59 private int pos; field in StringCharacterIterator 77 public StringCharacterIterator(String text, int pos) in StringCharacterIterator() argument 79 this(text, 0, text.length(), pos); in StringCharacterIterator() 91 public StringCharacterIterator(String text, int begin, int end, int pos) { in StringCharacterIterator() argument 99 if (pos < begin || pos > end) in StringCharacterIterator() 104 this.pos = pos; in StringCharacterIterator() 122 this.pos = 0; in setText() 131 pos = begin; in first() 142 pos = end - 1; in last() 144 pos = end; in last() [all …]
|
/libcore/json/src/main/java/org/json/ |
D | JSONTokener.java | 75 private int pos; field in JSONTokener 114 pos--; in nextValue() 123 while (pos < inLength) { in nextCleanInternal() 124 int c = in.charAt(pos++); in nextCleanInternal() 133 if (pos == inLength) { in nextCleanInternal() 137 char peek = in.charAt(pos); in nextCleanInternal() 141 pos++; in nextCleanInternal() 142 int commentEnd = in.indexOf("*/", pos); in nextCleanInternal() 146 pos = commentEnd + 2; in nextCleanInternal() 151 pos++; in nextCleanInternal() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestTextParser.java | 99 …public void test_parse_error(TemporalField field, TextStyle style, String text, int pos, Class<?> … in test_parse_error() argument 101 getFormatter(field, style).parseUnresolved(text, new ParsePosition(pos)); in test_parse_error() 109 ParsePosition pos = new ParsePosition(3); in test_parse_midStr() local 111 .parseUnresolved("XxxMondayXxx", pos) in test_parse_midStr() 113 assertEquals(pos.getIndex(), 9); in test_parse_midStr() 117 ParsePosition pos = new ParsePosition(0); in test_parse_remainderIgnored() local 119 .parseUnresolved("Wednesday", pos) in test_parse_remainderIgnored() 121 assertEquals(pos.getIndex(), 3); in test_parse_remainderIgnored() 126 ParsePosition pos = new ParsePosition(0); in test_parse_noMatch1() local 128 getFormatter(DAY_OF_WEEK, TextStyle.FULL).parseUnresolved("Munday", pos); in test_parse_noMatch1() [all …]
|
D | TestZoneOffsetParser.java | 89 …public void test_parse_error(String pattern, String noOffsetText, String text, int pos, Class<?> e… in test_parse_error() argument 91 getFormatter(pattern, noOffsetText).parseUnresolved(text, new ParsePosition(pos)); in test_parse_error() 99 ParsePosition pos = new ParsePosition(0); in test_parse_exactMatch_UTC() local 100 TemporalAccessor parsed = getFormatter("+HH:MM:ss", "Z").parseUnresolved("Z", pos); in test_parse_exactMatch_UTC() 101 assertEquals(pos.getIndex(), 1); in test_parse_exactMatch_UTC() 106 ParsePosition pos = new ParsePosition(0); in test_parse_startStringMatch_UTC() local 107 TemporalAccessor parsed = getFormatter("+HH:MM:ss", "Z").parseUnresolved("ZOTHER", pos); in test_parse_startStringMatch_UTC() 108 assertEquals(pos.getIndex(), 1); in test_parse_startStringMatch_UTC() 113 ParsePosition pos = new ParsePosition(5); in test_parse_midStringMatch_UTC() local 114 … TemporalAccessor parsed = getFormatter("+HH:MM:ss", "Z").parseUnresolved("OTHERZOTHER", pos); in test_parse_midStringMatch_UTC() [all …]
|
D | TestSettingsParser.java | 97 ParsePosition pos = new ParsePosition(0); in test_parse_changeStyle_sensitive() local 98 getFormatter().parseUnresolved("a", pos); in test_parse_changeStyle_sensitive() 99 assertEquals(pos.getIndex(), 0); in test_parse_changeStyle_sensitive() 104 ParsePosition pos = new ParsePosition(0); in test_parse_changeStyle_insensitive() local 105 getFormatter().parseUnresolved("a", pos); in test_parse_changeStyle_insensitive() 106 assertEquals(pos.getIndex(), 0); in test_parse_changeStyle_insensitive() 111 ParsePosition pos = new ParsePosition(0); in test_parse_changeStyle_strict() local 112 getFormatter().parseUnresolved("a", pos); in test_parse_changeStyle_strict() 113 assertEquals(pos.getIndex(), 0); in test_parse_changeStyle_strict() 118 ParsePosition pos = new ParsePosition(0); in test_parse_changeStyle_lenient() local [all …]
|
/libcore/ojluni/src/main/java/sun/security/util/ |
D | DerInputBuffer.java | 70 System.arraycopy(buf, pos, retval, 0, len); in toByteArray() 76 return pos; in getPos() 87 if (pos >= count) in peek() 90 return buf[pos]; in peek() 112 if (this.buf[this.pos + i] != other.buf[other.pos + i]) { in equals() 128 int p = pos; in hashCode() 138 count = pos + len; in truncate() 159 System.arraycopy(buf, pos, bytes, 0, len); in getBigInteger() 207 int numOfPadBits = buf[pos]; in getBitString() 213 System.arraycopy(buf, pos + 1, retval, 0, len - 1); in getBitString() [all …]
|
D | ManifestDigester.java | 66 private boolean findSection(int offset, Position pos) in findSection() argument 73 pos.endOfFirstLine = -1; in findSection() 79 if (pos.endOfFirstLine == -1) in findSection() 80 pos.endOfFirstLine = i-1; in findSection() 85 if (pos.endOfFirstLine == -1) in findSection() 86 pos.endOfFirstLine = i-1; in findSection() 89 pos.endOfSection = i; in findSection() 91 pos.endOfSection = last; in findSection() 92 pos.startOfNext = i+1; in findSection() 117 Position pos = new Position(); in ManifestDigester() local [all …]
|
/libcore/ojluni/src/main/java/java/io/ |
D | ByteArrayInputStream.java | 65 protected int pos; field in ByteArrayInputStream 107 this.pos = 0; in ByteArrayInputStream() 127 this.pos = offset; in ByteArrayInputStream() 146 return (pos < count) ? (buf[pos++] & 0xff) : -1; in read() 175 if (pos >= count) { in read() 179 int avail = count - pos; in read() 186 System.arraycopy(buf, pos, b, off, len); in read() 187 pos += len; in read() 192 byte[] result = Arrays.copyOfRange(buf, pos, count); in readAllBytes() 193 pos = count; in readAllBytes() [all …]
|
D | BufferedInputStream.java | 100 protected int pos; field in BufferedInputStream 209 pos = 0; /* no mark: throw away the buffer */ in fill() 210 else if (pos >= buffer.length) { /* no room left in buffer */ in fill() 212 int sz = pos - markpos; in fill() 214 pos = sz; in fill() 218 pos = 0; /* drop buffer contents */ in fill() 220 int nsz = ArraysSupport.newLength(pos, in fill() 222 pos /* preferred growth */); in fill() 226 System.arraycopy(buffer, 0, nbuf, 0, pos); in fill() 238 count = pos; in fill() [all …]
|
D | CharArrayReader.java | 43 protected int pos; field in CharArrayReader 60 this.pos = 0; in CharArrayReader() 87 this.pos = offset; in CharArrayReader() 106 if (pos >= count) in read() 109 return buf[pos++]; in read() 139 if (pos >= count) { in read() 143 int avail = count - pos; in read() 150 System.arraycopy(buf, pos, cbuf, off, len); in read() 151 pos += len; in read() 161 if (pos >= count) { in read() [all …]
|
D | StringBufferInputStream.java | 58 protected int pos; field in StringBufferInputStream 92 return (pos < count) ? (buffer.charAt(pos++) & 0xFF) : -1; in read() 119 if (pos >= count) { in read() 123 int avail = count - pos; in read() 131 buffer.getBytes(pos, pos + len, b, off); in read() 132 pos += len; in read() 147 if (n > count - pos) { in skip() 148 n = count - pos; in skip() 150 pos += n; in skip() 162 return count - pos; in available() [all …]
|
D | PushbackReader.java | 43 private int pos; field in PushbackReader 58 this.pos = size; in PushbackReader() 87 if (pos < buf.length) in read() 88 return buf[pos++]; in read() 119 int avail = buf.length - pos; in read() 123 System.arraycopy(buf, pos, cbuf, off, avail); in read() 124 pos += avail; in read() 155 if (pos == 0) in unread() 157 buf[--pos] = (char) c; in unread() 178 if (len > pos) in unread() [all …]
|
D | PushbackInputStream.java | 68 protected int pos; field in PushbackInputStream 96 this.pos = size; in PushbackInputStream() 133 if (pos < buf.length) { in read() 134 return buf[pos++] & 0xff; in read() 172 int avail = buf.length - pos; in read() 177 System.arraycopy(buf, pos, b, off, avail); in read() 178 pos += avail; in read() 205 if (pos == 0) { in unread() 208 buf[--pos] = (byte)b; in unread() 228 if (len > pos) { in unread() [all …]
|
/libcore/ojluni/src/main/java/java/nio/ |
D | HeapByteBuffer.java | 122 int mark, int pos, int lim, int cap, in HeapByteBuffer() argument 126 super(mark, pos, lim, cap, buf, off); in HeapByteBuffer() 142 int pos = this.position(); in slice() local 144 int rem = (pos <= lim ? lim - pos : 0); in slice() 151 pos + offset, in slice() 240 int pos = position(); in get() local 241 if (length > limit() - pos) in get() 243 System.arraycopy(hb, ix(pos), dst, offset, length); in get() 244 position(pos + length); in get() 300 int pos = position(); in put() local [all …]
|
D | HeapCharBuffer.java | 122 int mark, int pos, int lim, int cap, in HeapCharBuffer() argument 126 super(mark, pos, lim, cap, buf, off); in HeapCharBuffer() 142 int pos = this.position(); in slice() local 144 int rem = (pos <= lim ? lim - pos : 0); in slice() 151 pos + offset, in slice() 240 int pos = position(); in get() local 241 if (length > limit() - pos) in get() 243 System.arraycopy(hb, ix(pos), dst, offset, length); in get() 244 position(pos + length); in get() 300 int pos = position(); in put() local [all …]
|
/libcore/support/src/test/java/tests/support/ |
D | Support_StringReader.java | 28 private int pos = 0; field in Support_StringReader 84 markpos = pos; in mark() 121 if (pos != count) { in read() 122 return str.charAt(pos++); in read() 154 if (pos == this.count) { in read() 157 int end = pos + count > this.count ? this.count : pos in read() 159 str.getChars(pos, end, buf, offset); in read() 160 int read = end - pos; in read() 161 pos = end; in read() 208 pos = markpos != -1 ? markpos : 0; in reset() [all …]
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | IOUtil.java | 54 int pos = src.position(); in write() local 56 assert (pos <= lim); in write() 57 int rem = (pos <= lim ? lim - pos : 0); in write() 63 src.position(pos); in write() 68 src.position(pos + n); in write() 80 int pos = bb.position(); in writeFromNativeBuffer() local 82 assert (pos <= lim); in writeFromNativeBuffer() 83 int rem = (pos <= lim ? lim - pos : 0); in writeFromNativeBuffer() 90 ((DirectBuffer)bb).address() + pos, in writeFromNativeBuffer() 93 written = nd.write(fd, ((DirectBuffer)bb).address() + pos, rem); in writeFromNativeBuffer() [all …]
|
/libcore/ojluni/src/main/java/java/util/zip/ |
D | ZipUtils.java | 262 static final long CENSIG(byte[] b, int pos) { return LG(b, pos + 0); } in CENSIG() argument 263 static final int CENVEM(byte[] b, int pos) { return SH(b, pos + 4); } in CENVEM() argument 264 …static final int CENVEM_FA(byte[] b, int pos) { return CH(b, pos + 5); } // file attribute compat… in CENVEM_FA() argument 265 static final int CENVER(byte[] b, int pos) { return SH(b, pos + 6); } in CENVER() argument 266 static final int CENFLG(byte[] b, int pos) { return SH(b, pos + 8); } in CENFLG() argument 267 static final int CENHOW(byte[] b, int pos) { return SH(b, pos + 10);} in CENHOW() argument 268 static final long CENTIM(byte[] b, int pos) { return LG(b, pos + 12);} in CENTIM() argument 269 static final long CENCRC(byte[] b, int pos) { return LG(b, pos + 16);} in CENCRC() argument 270 static final long CENSIZ(byte[] b, int pos) { return LG(b, pos + 20);} in CENSIZ() argument 271 static final long CENLEN(byte[] b, int pos) { return LG(b, pos + 24);} in CENLEN() argument [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | PipedInputStreamTest.java | 27 PipedOutputStream pos; field in PipedInputStreamTest.PWriter 33 pos.write(bytes); in run() 44 pos = pout; in PWriter() 58 PipedOutputStream pos; field in PipedInputStreamTest 80 pos = new PipedOutputStream(); in test_readException() 83 pis.connect(pos); in test_readException() 84 t = new Thread(pw = new PWriter(pos, 1000)); in test_readException() 94 pos.close(); in test_readException() 105 pos = new PipedOutputStream(); in test_available() 107 pis.connect(pos); in test_available() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | SSLEngineResultTest.java | 95 int[] pos = { 0, 1, 1000, Integer.MAX_VALUE, (Integer.MAX_VALUE - 1) }; in test_bytesConsumed() local 102 for (int n = 0; n < pos.length; n++) { in test_bytesConsumed() 103 for (int l = 0; l < pos.length; l++) { in test_bytesConsumed() 105 enHS[j], pos[n], pos[l]); in test_bytesConsumed() 106 assertEquals("Incorrect bytesConsumed", pos[n], in test_bytesConsumed() 118 int[] pos = { 0, 1, 1000, Integer.MAX_VALUE, (Integer.MAX_VALUE - 1) }; in test_bytesProduced() local 125 for (int n = 0; n < pos.length; n++) { in test_bytesProduced() 126 for (int l = 0; l < pos.length; ++l) { in test_bytesProduced() 128 enHS[j], pos[n], pos[l]); in test_bytesProduced() 129 assertEquals("Incorrect bytesProduced", pos[l], in test_bytesProduced() [all …]
|
/libcore/ojluni/src/main/java/sun/misc/ |
D | IOUtils.java | 54 int pos = 0; in readFully() local 55 while (pos < length) { in readFully() 57 if (pos >= output.length) { // Only expand when there's no room in readFully() 58 bytesToRead = Math.min(length - pos, output.length + 1024); in readFully() 59 if (output.length < pos + bytesToRead) { in readFully() 60 output = Arrays.copyOf(output, pos + bytesToRead); in readFully() 63 bytesToRead = output.length - pos; in readFully() 65 int cc = is.read(output, pos, bytesToRead); in readFully() 70 if (output.length != pos) { in readFully() 71 output = Arrays.copyOf(output, pos); in readFully() [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
D | TCKPadPrinterParser.java | 83 private ParsePosition pos; field in TCKPadPrinterParser 88 pos = new ParsePosition(0); in setUp() 132 TemporalAccessor parsed = builder.toFormatter().parseUnresolved(text, pos); in test_parseStrict() 133 assertEquals(pos.getIndex(), expectedIndex); in test_parseStrict() 134 assertEquals(pos.getErrorIndex(), expectedErrorIndex); in test_parseStrict() 173 TemporalAccessor parsed = builder.toFormatter().parseUnresolved(text, pos); in test_parseLenient() 174 assertEquals(pos.getIndex(), expectedIndex); in test_parseLenient() 175 assertEquals(pos.getErrorIndex(), expectedErrorIndex); in test_parseLenient() 188 TemporalAccessor parsed = builder.toFormatter().parseUnresolved("--HELLO-", pos); in test_parse_decoratedStartsWithPad() 189 assertEquals(pos.getIndex(), 0); in test_parse_decoratedStartsWithPad() [all …]
|
/libcore/ojluni/src/main/java/java/util/jar/ |
D | Manifest.java | 245 int pos = 1; in println72() local 246 while (length - pos > 71) { in println72() 247 out.write(lineBytes, pos, 71); in println72() 248 pos += 71; in println72() 252 out.write(lineBytes, pos, length - pos); in println72() 423 private int pos = 0; field in Manifest.FastInputStream 435 if (pos >= count) { in read() 437 if (pos >= count) { in read() 441 return Byte.toUnsignedInt(buf[pos++]); in read() 445 int avail = count - pos; in read() [all …]
|
/libcore/ojluni/src/test/java/io/InputStream/ |
D | Skip.java | 71 long pos = in.position(); in dotestExact() local 72 assert pos == curpos : pos + " != " + curpos; in dotestExact() 74 if (in.position() != pos + (toskip < 0 ? 0 : toskip)) { in dotestExact() 75 throw new RuntimeException((in.position() - pos) + in dotestExact() 154 long pos = 0; in testSkip() local 158 dotestExact(in, pos, streamLength, n, true, false); in testSkip() 162 dotestExact(in, pos, streamLength, n, true, false); in testSkip() 163 pos += n + 1; in testSkip() 167 dotestExact(in, pos, streamLength, n, false, true); in testSkip() 168 pos += n/2 + n/4; in testSkip() [all …]
|