/libcore/luni/src/main/java/java/nio/channels/ |
H A D | FileLock.java | 76 // The lock starting position. 77 private final long position; field in class:FileLock 87 * enforces the starting position, length and sharing mode of the lock. 91 * @param position 99 protected FileLock(FileChannel channel, long position, long size, boolean shared) { argument 100 if (position < 0 || size < 0 || position + size < 0) { 101 throw new IllegalArgumentException("position=" + position + " size=" + size); 104 this.position 121 public final long position() { method in class:FileLock [all...] |
/libcore/luni/src/main/java/java/util/ |
H A D | StringTokenizer.java | 48 private int position; field in class:StringTokenizer 100 this.position = 0; 112 for (int i = position, length = string.length(); i < length; i++) { 149 if (position < length) { 155 for (int i = position; i < length; i++) 185 int i = position; 190 if (delimiters.indexOf(string.charAt(position), 0) >= 0) 191 return String.valueOf(string.charAt(position++)); 192 for (position++; position < lengt [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/ |
H A D | AbstractBufferTest.java | 42 assertTrue(0 <= baseBuf.position() && baseBuf.position() <= baseBuf.limit() 48 int oldPosition = baseBuf.position(); 53 assertEquals(baseBuf.position(), 0); 64 baseBuf.position(oldPosition); 69 int oldPosition = baseBuf.position(); 74 assertEquals(baseBuf.position(), 0); 85 baseBuf.position(oldPosition); 90 int oldPosition = baseBuf.position(); 93 assertEquals(baseBuf.hasRemaining(), baseBuf.position() < baseBu [all...] |
/libcore/luni/src/main/java/libcore/io/ |
H A D | HeapBufferIterator.java | 33 private int position; field in class:HeapBufferIterator 43 position = offset; 47 position += byteCount; 51 System.arraycopy(buffer, offset + position, dst, dstOffset, byteCount); 52 position += byteCount; 56 byte result = buffer[offset + position]; 57 ++position; 62 int result = Memory.peekInt(buffer, offset + position, order); 63 position += SizeOf.INT; 69 Memory.unsafeBulkGet(dst, dstOffset, byteCount, buffer, offset + position, SizeO [all...] |
H A D | NioBufferIterator.java | 32 private int position; field in class:NioBufferIterator 41 position = offset; 45 position += byteCount; 49 Memory.peekByteArray(address + position, dst, dstOffset, byteCount); 50 position += byteCount; 54 byte result = Memory.peekByte(address + position); 55 ++position; 60 int result = Memory.peekInt(address + position, swap); 61 position += SizeOf.INT; 66 Memory.peekIntArray(address + position, ds [all...] |
/libcore/dex/src/main/java/com/android/dex/util/ |
H A D | ByteArrayByteInput.java | 22 private int position; field in class:ByteArrayByteInput 29 return bytes[position++];
|
/libcore/luni/src/main/java/java/nio/ |
H A D | CharArrayBuffer.java | 45 buf.position = other.position(); 58 System.arraycopy(backingArray, position + arrayOffset, backingArray, arrayOffset, remaining()); 59 position = limit - position; 70 return new CharArrayBuffer(remaining(), backingArray, arrayOffset + position, isReadOnly); 99 if (position == limit) { 102 return backingArray[arrayOffset + position++]; 114 System.arraycopy(backingArray, arrayOffset + position, dst, srcOffset, charCount); 115 position [all...] |
H A D | Buffer.java | 27 * position if you do not specify an index explicitly. Position may not be 33 * <li>Mark: used to remember the current position, so that you can reset the 34 * position later. Mark may not be negative and no greater than position.</li> 37 * while changing the position, limit and mark of a read-only buffer is OK.</li> 65 * Mark is where position will be set when <code>reset()</code> is called. 67 * greater than <code>position</code>. 72 * The current position of this buffer. Position is always no less than zero 75 int position = 0; field in class:Buffer 121 * is not necessarily the same size as the buffer, and position 327 public final int position() { method in class:Buffer 344 public final Buffer position(int newPosition) { method in class:Buffer [all...] |
H A D | ByteBufferAsCharBuffer.java | 28 * <li>The byte buffer's position and limit are NOT linked with the adapter. 29 * The adapter extends Buffer, thus has its own position and limit.</li> 54 buf.position = position; 66 byteBuffer.position(position * SizeOf.CHAR); 69 position = limit - position; 80 buf.position = position; [all...] |
H A D | ByteArrayBuffer.java | 54 buf.position = other.position(); 67 System.arraycopy(backingArray, position + arrayOffset, backingArray, arrayOffset, remaining()); 68 position = limit - position; 79 return new ByteArrayBuffer(remaining(), backingArray, arrayOffset + position, isReadOnly); 109 System.arraycopy(backingArray, arrayOffset + position, dst, dstOffset, byteCount); 110 position += byteCount; 116 Memory.unsafeBulkGet(dst, dstOffset, byteCount, backingArray, arrayOffset + position, SizeOf.CHAR, order.needsSwap); 117 position [all...] |
H A D | CharSequenceAdapter.java | 37 buf.position = other.position; 66 if (position == limit) { 69 return sequence.charAt(position++); 84 int newPosition = position + charCount; 85 sequence.toString().getChars(position, newPosition, dst, dstOffset); 86 position = newPosition; 139 return new CharSequenceAdapter(sequence.subSequence(position, limit)); 145 result.position = position [all...] |
H A D | FileChannelImpl.java | 49 long position1 = lock1.position(); 50 long position2 = lock2.position(); 94 private FileLock basicLock(long position, long size, boolean shared, boolean wait) throws IOException { argument 106 if (position < 0 || size < 0) { 107 throw new IllegalArgumentException("position=" + position + " size=" + size); 110 FileLock pendingLock = new FileLockImpl(this, position, size, shared); 116 flock.l_start = position; 140 public FileLockImpl(FileChannel channel, long position, long size, boolean shared) { argument 141 super(channel, position, siz 159 lock(long position, long size, boolean shared) argument 179 tryLock(long position, long size, boolean shared) argument 220 map(MapMode mapMode, long position, long size) argument 261 public long position() throws IOException { method in class:FileChannelImpl 270 public FileChannel position(long newPosition) throws IOException { method in class:FileChannelImpl 283 read(ByteBuffer buffer, long position) argument 294 readImpl(ByteBuffer buffer, long position) argument 363 transferFrom(ReadableByteChannel src, long position, long count) argument 403 transferTo(long position, long count, WritableByteChannel target) argument 472 write(ByteBuffer buffer, long position) argument 483 writeImpl(ByteBuffer buffer, long position) argument [all...] |
H A D | DoubleArrayBuffer.java | 45 buf.position = other.position(); 58 System.arraycopy(backingArray, position + arrayOffset, backingArray, arrayOffset, remaining()); 59 position = limit - position; 70 return new DoubleArrayBuffer(remaining(), backingArray, arrayOffset + position, isReadOnly); 99 if (position == limit) { 102 return backingArray[arrayOffset + position++]; 114 System.arraycopy(backingArray, arrayOffset + position, dst, dstOffset, doubleCount); 115 position [all...] |
H A D | FloatArrayBuffer.java | 45 buf.position = other.position(); 59 System.arraycopy(backingArray, position + arrayOffset, backingArray, arrayOffset, remaining()); 60 position = limit - position; 71 return new FloatArrayBuffer(remaining(), backingArray, arrayOffset + position, isReadOnly); 100 if (position == limit) { 103 return backingArray[arrayOffset + position++]; 115 System.arraycopy(backingArray, arrayOffset + position, dst, dstOffset, floatCount); 116 position [all...] |
H A D | IntArrayBuffer.java | 45 buf.position = other.position(); 58 System.arraycopy(backingArray, position + arrayOffset, backingArray, arrayOffset, remaining()); 59 position = limit - position; 70 return new IntArrayBuffer(remaining(), backingArray, arrayOffset + position, isReadOnly); 99 if (position == limit) { 102 return backingArray[arrayOffset + position++]; 114 System.arraycopy(backingArray, arrayOffset + position, dst, dstOffset, intCount); 115 position [all...] |
H A D | LongArrayBuffer.java | 45 buf.position = other.position(); 58 System.arraycopy(backingArray, position + arrayOffset, backingArray, arrayOffset, remaining()); 59 position = limit - position; 70 return new LongArrayBuffer(remaining(), backingArray, arrayOffset + position, isReadOnly); 99 if (position == limit) { 102 return backingArray[arrayOffset + position++]; 114 System.arraycopy(backingArray, arrayOffset + position, dst, dstOffset, longCount); 115 position [all...] |
H A D | ShortArrayBuffer.java | 45 buf.position = other.position(); 58 System.arraycopy(backingArray, position + arrayOffset, backingArray, arrayOffset, remaining()); 59 position = limit - position; 70 return new ShortArrayBuffer(remaining(), backingArray, arrayOffset + position, isReadOnly); 99 if (position == limit) { 102 return backingArray[arrayOffset + position++]; 114 System.arraycopy(backingArray, arrayOffset + position, dst, dstOffset, shortCount); 115 position [all...] |
H A D | ByteBufferAsDoubleBuffer.java | 28 * <li>The byte buffer's position and limit are NOT linked with the adapter. 29 * The adapter extends Buffer, thus has its own position and limit.</li> 54 buf.position = position; 66 byteBuffer.position(position * SizeOf.DOUBLE); 69 position = limit - position; 80 buf.position = position; [all...] |
H A D | ByteBufferAsFloatBuffer.java | 28 * <li>The byte buffer's position and limit are NOT linked with the adapter. 29 * The adapter extends Buffer, thus has its own position and limit.</li> 53 buf.position = position; 65 byteBuffer.position(position * SizeOf.FLOAT); 68 position = limit - position; 79 buf.position = position; [all...] |
H A D | ByteBufferAsIntBuffer.java | 28 * <li>The byte buffer's position and limit are NOT linked with the adapter. 29 * The adapter extends Buffer, thus has its own position and limit.</li> 54 buf.position = position; 66 byteBuffer.position(position * SizeOf.INT); 69 position = limit - position; 80 buf.position = position; [all...] |
H A D | ByteBufferAsLongBuffer.java | 28 * <li>The byte buffer's position and limit are NOT linked with the adapter. 29 * The adapter extends Buffer, thus has its own position and limit.</li> 54 buf.position = position; 66 byteBuffer.position(position * SizeOf.LONG); 69 position = limit - position; 80 buf.position = position; [all...] |
H A D | ByteBufferAsShortBuffer.java | 28 * <li>The byte buffer's position and limit are NOT linked with the adapter. 29 * The adapter extends Buffer, thus has its own position and limit.</li> 53 buf.position = position; 65 byteBuffer.position(position * SizeOf.SHORT); 68 position = limit - position; 79 buf.position = position; [all...] |
/libcore/support/src/test/java/tests/support/ |
H A D | Support_OutputStream.java | 19 private int position; field in class:Support_OutputStream 36 position = 0; 85 if (position < size) { 86 buffer[position] = (byte)(oneByte & 255); 87 position++; 94 byte[] toReturn = new byte[position]; 95 System.arraycopy(buffer, 0, toReturn, 0, position); 100 return new String(buffer, 0, position); 104 return position;
|
/libcore/luni/src/main/java/javax/crypto/ |
H A D | CipherSpi.java | 315 * {@code input.remaining()} bytes starting at {@code input.position()} are 339 int position = input.position(); 341 if ((limit - position) <= 0) { 349 bOutput = engineUpdate(bInput, offset + position, limit - position); 350 input.position(limit); 352 bInput = new byte[limit - position]; 354 bOutput = engineUpdate(bInput, 0, limit - position); 399 * {@code input.remaining()} bytes starting at {@code input.position()} ar [all...] |
/libcore/luni/src/main/java/java/text/ |
H A D | Format.java | 149 ParsePosition position = new ParsePosition(0); 150 Object result = parseObject(string, position); 151 if (position.getIndex() == 0) { 152 throw new ParseException("Parse failure", position.getErrorIndex()); 159 * {@code position}. If the string is successfully parsed then the index of 166 * @param position 175 public abstract Object parseObject(String string, ParsePosition position); argument 177 static boolean upTo(String string, ParsePosition position, argument 179 int index = position.getIndex(), length = string.length(); 192 position 204 upToWithQuotes(String string, ParsePosition position, StringBuffer buffer, char stop, char start) argument [all...] |