/libcore/ojluni/src/main/java/java/nio/channels/ |
H A D | FileLock.java | 64 * held, the type and validity of the lock, and the position and size of the 110 * certain position, often 2<sup>30</sup> or 2<sup>31</sup>. In general, great 122 private final long position; field in class:FileLock 132 * @param position 133 * The position within the file at which the locked region starts; 138 * <tt>position</tt> + <tt>size</tt> must be non-negative 148 long position, long size, boolean shared) 150 if (position < 0) 151 throw new IllegalArgumentException("Negative position"); 154 if (position 147 FileLock(FileChannel channel, long position, long size, boolean shared) argument 185 FileLock(AsynchronousFileChannel channel, long position, long size, boolean shared) argument 234 public final long position() { method in class:FileLock 272 overlaps(long position, long size) argument [all...] |
H A D | SeekableByteChannel.java | 32 * A byte channel that maintains a current <i>position</i> and allows the 33 * position to be changed. 37 * written. The current position can be {@link #position() <i>queried</i>} and 38 * {@link #position(long) <i>modified</i>}. The channel also provides access to 43 * <p> The {@link #position(long) position} and {@link #truncate truncate} methods 59 * <p> Bytes are read starting at this channel's current position, and 60 * then the position is updated with the number of bytes actually read. 70 * <p> Bytes are written starting at this channel's current position, unles 94 long position() throws IOException; method in interface:SeekableByteChannel 125 SeekableByteChannel position(long newPosition) throws IOException; method in interface:SeekableByteChannel [all...] |
H A D | FileChannel.java | 43 * a file. It has a current <i>position</i> within its file which can 44 * be both {@link #position() <i>queried</i>} and {@link #position(long) 61 * position in a file in a way that does not affect the channel's current 62 * position. </p></li> 87 * channel's position or can change its file's size may be in progress at any 90 * operations, in particular those that take an explicit position, may proceed 114 * method returned the channel. Changing the channel's position, whether 115 * explicitly or by reading or writing bytes, will change the file position of 140 * operation first advances the position t 433 public abstract long position() throws IOException; method in class:FileChannel 461 public abstract FileChannel position(long newPosition) throws IOException; method in class:FileChannel 619 transferTo(long position, long count, WritableByteChannel target) argument 686 transferFrom(ReadableByteChannel src, long position, long count) argument 733 read(ByteBuffer dst, long position) argument 778 write(ByteBuffer src, long position) argument 915 map(MapMode mode, long position, long size) argument 1011 lock(long position, long size, boolean shared) argument 1122 tryLock(long position, long size, boolean shared) argument [all...] |
/libcore/ojluni/src/main/java/java/nio/ |
H A D | Buffer.java | 36 * buffer are its capacity, limit, and position: </p> 47 * <p> A buffer's <i>position</i> is the index of the next element to be 48 * read or written. A buffer's position is never negative and is never 64 * at the current position and then increment the position by the number of 71 * affect the position. Absolute <i>get</i> and <i>put</i> operations throw 79 * current position. 84 * <p> A buffer's <i>mark</i> is the index to which its position will be reset 87 * than the position. If the mark is defined then it is discarded when the 88 * position o 186 int position = 0; field in class:Buffer 234 public final int position() { method in class:Buffer 247 public final Buffer position(int newPosition) { method in class:Buffer [all...] |
H A D | HeapCharBuffer.java | 81 this.position() + offset, 88 this.position(), 99 this.position(), 126 System.arraycopy(hb, ix(position()), dst, offset, length); 127 position(position() + length); 162 System.arraycopy(src, offset, hb, ix(position()), length); 163 position(position() + length); 179 System.arraycopy(sb.hb, sb.ix(sb.position()), [all...] |
H A D | HeapDoubleBuffer.java | 82 this.position() + offset, 89 this.position(), 99 this.position(), 121 System.arraycopy(hb, ix(position()), dst, offset, length); 122 position(position() + length); 157 System.arraycopy(src, offset, hb, ix(position()), length); 158 position(position() + length); 174 System.arraycopy(sb.hb, sb.ix(sb.position()), [all...] |
H A D | HeapFloatBuffer.java | 81 this.position() + offset, 88 this.position(), 98 this.position(), 120 System.arraycopy(hb, ix(position()), dst, offset, length); 121 position(position() + length); 156 System.arraycopy(src, offset, hb, ix(position()), length); 157 position(position() + length); 173 System.arraycopy(sb.hb, sb.ix(sb.position()), [all...] |
H A D | HeapIntBuffer.java | 81 this.position() + offset, 88 this.position(), 99 this.position(), 121 System.arraycopy(hb, ix(position()), dst, offset, length); 122 position(position() + length); 157 System.arraycopy(src, offset, hb, ix(position()), length); 158 position(position() + length); 174 System.arraycopy(sb.hb, sb.ix(sb.position()), [all...] |
H A D | HeapLongBuffer.java | 82 this.position() + offset, 89 this.position(), 99 this.position(), 122 System.arraycopy(hb, ix(position()), dst, offset, length); 123 position(position() + length); 158 System.arraycopy(src, offset, hb, ix(position()), length); 159 position(position() + length); 175 System.arraycopy(sb.hb, sb.ix(sb.position()), [all...] |
H A D | HeapShortBuffer.java | 81 this.position() + offset, 88 this.position(), 99 this.position(), 121 System.arraycopy(hb, ix(position()), dst, offset, length); 122 position(position() + length); 157 System.arraycopy(src, offset, hb, ix(position()), length); 158 position(position() + length); 174 System.arraycopy(sb.hb, sb.ix(sb.position()), [all...] |
H A D | ByteBufferAsDoubleBuffer.java | 48 // the position of parent buffer. Therefore, value of "off" will be equal to parent buffer's 49 // position when the method is called from either HeapByteBuffer or DirectByteBuffer. 59 int pos = this.position(); 71 position(), 81 position(), 104 bb.getUnchecked(ix(position), dst, offset, length); 105 position += length; 126 bb.putUnchecked(ix(position), src, offset, length); 127 position += length; 135 int pos = position(); [all...] |
H A D | ByteBufferAsFloatBuffer.java | 47 // the position of parent buffer. Therefore, value of "off" will be equal to parent buffer's 48 // position when the method is called from either HeapByteBuffer or DirectByteBuffer. 58 int pos = this.position(); 70 position(), 80 position(), 103 bb.getUnchecked(ix(position), dst, offset, length); 104 position += length; 125 bb.putUnchecked(ix(position), src, offset, length); 126 position += length; 134 int pos = position(); [all...] |
H A D | ByteBufferAsIntBuffer.java | 47 // the position of parent buffer. Therefore, value of "off" will be equal to parent buffer's 48 // position when the method is called from either HeapByteBuffer or DirectByteBuffer. 58 int pos = this.position(); 70 position(), 80 position(), 103 bb.getUnchecked(ix(position), dst, offset, length); 104 position += length; 125 bb.putUnchecked(ix(position), src, offset, length); 126 position += length; 134 int pos = position(); [all...] |
H A D | ByteBufferAsLongBuffer.java | 47 // the position of parent buffer. Therefore, value of "off" will be equal to parent buffer's 48 // position when the method is called from either HeapByteBuffer or DirectByteBuffer. 58 int pos = this.position(); 70 this.position(), 80 this.position(), 103 bb.getUnchecked(ix(position), dst, offset, length); 104 position += length; 125 bb.putUnchecked(ix(position), src, offset, length); 126 position += length; 134 int pos = position(); [all...] |
H A D | ByteBufferAsShortBuffer.java | 47 // the position of parent buffer. Therefore, value of "off" will be equal to parent buffer's 48 // position when the method is called from either HeapByteBuffer or DirectByteBuffer. 58 int pos = this.position(); 70 this.position(), 79 this.position(), 102 bb.getUnchecked(ix(position), dst, offset, length); 103 position += length; 124 bb.putUnchecked(ix(position), src, offset, length); 125 position += length; 133 int pos = position(); [all...] |
/libcore/luni/src/main/java/libcore/io/ |
H A D | NioBufferIterator.java | 32 private int position; field in class:NioBufferIterator 54 position = offset; 58 position += byteCount; 63 return position; 69 checkReadBounds(position, length, byteCount); 70 Memory.peekByteArray(address + position, dst, dstOffset, byteCount); 71 position += byteCount; 76 checkReadBounds(position, length, 1); 77 byte result = Memory.peekByte(address + position); 78 ++position; 107 checkReadBounds(int position, int length, int byteCount) argument [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...] |
H A D | SliceSliceDirectByteBufferTest.java | 24 buf.position(1); 26 buf.position(1);
|
/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/ojluni/src/main/java/java/util/ |
H A D | StringTokenizer.java | 55 * position within the string to be tokenized. Some operations advance this 56 * current position past the characters processed.<p> 240 * Skips delimiters starting from the specified position. If retDelims 248 int position = startPos; 249 while (!retDelims && position < maxPosition) { 251 char c = str.charAt(position); 254 position++; 256 int c = str.codePointAt(position); 260 position += Character.charCount(c); 263 return position; [all...] |
/libcore/ojluni/src/main/java/sun/nio/ch/ |
H A D | AsynchronousFileChannelImpl.java | 106 abstract <A> Future<FileLock> implLock(long position, argument 113 public final Future<FileLock> lock(long position, argument 118 return implLock(position, size, shared, null, null); 122 public final <A> void lock(long position, argument 130 implLock(position, size, shared, attachment, handler); 162 protected final FileLockImpl addToFileLockTable(long position, long size, boolean shared) { argument 176 fli = new FileLockImpl(this, position, size, shared); 212 long position, 217 public final Future<Integer> read(ByteBuffer dst, long position) { argument 218 return implRead(dst, position, nul 211 implRead(ByteBuffer dst, long position, A attachment, CompletionHandler<Integer,? super A> handler) argument 222 read(ByteBuffer dst, long position, A attachment, CompletionHandler<Integer,? super A> handler) argument 232 implWrite(ByteBuffer src, long position, A attachment, CompletionHandler<Integer,? super A> handler) argument 239 write(ByteBuffer src, long position) argument 244 write(ByteBuffer src, long position, A attachment, CompletionHandler<Integer,? super A> handler) argument [all...] |
H A D | FileLockImpl.java | 36 FileLockImpl(FileChannel channel, long position, long size, boolean shared) argument 38 super(channel, position, size, shared); 41 FileLockImpl(AsynchronousFileChannel channel, long position, long size, boolean shared) argument 43 super(channel, position, size, shared);
|
H A D | IOUtil.java | 46 static int write(FileDescriptor fd, ByteBuffer src, long position, argument 51 return writeFromNativeBuffer(fd, src, position, nd); 54 int pos = src.position(); 63 src.position(pos); 65 int n = writeFromNativeBuffer(fd, bb, position, nd); 68 src.position(pos + n); 77 long position, NativeDispatcher nd) 80 int pos = bb.position(); 88 if (position != -1) { 91 rem, position); 76 writeFromNativeBuffer(FileDescriptor fd, ByteBuffer bb, long position, NativeDispatcher nd) argument 185 read(FileDescriptor fd, ByteBuffer dst, long position, NativeDispatcher nd) argument 207 readIntoNativeBuffer(FileDescriptor fd, ByteBuffer bb, long position, NativeDispatcher nd) argument [all...] |
/libcore/ojluni/src/main/java/java/text/ |
H A D | CharacterIterator.java | 82 * Traverse both forward and backward from a given position in the text. 116 * Sets the position to getBeginIndex() and returns the character at that 117 * position. 124 * Sets the position to getEndIndex()-1 (getEndIndex() if the text is empty) 125 * and returns the character at that position. 132 * Gets the character at the current position (as returned by getIndex()). 133 * @return the character at the current position or DONE if the current 134 * position is off the end of the text. 144 * @return the character at the new position or DONE if the new 145 * position i 166 setIndex(int position) argument [all...] |
/libcore/luni/src/main/java/java/nio/ |
H A D | NIOAccess.java | 28 * Buffer starting at the Buffer's current position, or 0 if the 38 return address + (b.position << b._elementSizeShift); 53 * account the Buffer's current position. This method is only 57 return b.hasArray() ? ((b.arrayOffset() + b.position) << b._elementSizeShift) : 0;
|