/libcore/ojluni/src/main/java/java/nio/channels/ |
H A D | FileLock.java | 61 * held, the type and validity of the lock, and the position and size of the 107 * certain position, often 2<sup>30</sup> or 2<sup>31</sup>. In general, great 119 private final long position; field in class:FileLock 129 * @param position 130 * The position within the file at which the locked region starts; 135 * <tt>position</tt> + <tt>size</tt> must be non-negative 145 long position, long size, boolean shared) 147 if (position < 0) 148 throw new IllegalArgumentException("Negative position"); 151 if (position 144 FileLock(FileChannel channel, long position, long size, boolean shared) argument 193 public final long position() { method in class:FileLock 226 overlaps(long position, long size) argument [all...] |
H A D | FileChannel.java | 40 * a file. It has a current <i>position</i> within its file which can 41 * be both {@link #position() <i>queried</i>} and {@link #position(long) 58 * position in a file in a way that does not affect the channel's current 59 * position. </p></li> 84 * channel's position or can change its file's size may be in progress at any 87 * operations, in particular those that take an explicit position, may proceed 110 * method returned the channel. Changing the channel's position, whether 111 * explicitly or by reading or writing bytes, will change the file position of 136 * operation first advances the position t 255 public abstract long position() throws IOException; method in class:FileChannel 283 public abstract FileChannel position(long newPosition) throws IOException; method in class:FileChannel 441 transferTo(long position, long count, WritableByteChannel target) argument 508 transferFrom(ReadableByteChannel src, long position, long count) argument 555 read(ByteBuffer dst, long position) argument 600 write(ByteBuffer src, long position) argument 737 map(MapMode mode, long position, long size) argument 833 lock(long position, long size, boolean shared) argument 944 tryLock(long position, long size, boolean shared) 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 92 long position() throws IOException; method in interface:SeekableByteChannel 118 SeekableByteChannel position(long newPosition) throws IOException; method in interface:SeekableByteChannel [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); 178 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); 173 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); 172 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); 173 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); 174 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); 173 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. 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 | 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. 57 int pos = this.position(); 69 position(), 79 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...] |
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. 57 int pos = this.position(); 69 position(), 79 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...] |
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. 57 int pos = this.position(); 69 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...] |
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. 57 int pos = this.position(); 69 this.position(), 78 this.position(), 101 bb.getUnchecked(ix(position), dst, offset, length); 102 position += length; 123 bb.putUnchecked(ix(position), src, offset, length); 124 position += length; 132 int pos = position(); [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/luni/src/main/java/libcore/io/ |
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/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/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;
|
/libcore/dex/src/main/java/com/android/dex/ |
H A D | Dex.java | 128 // if it's an .odex file, set position and limit to the .dex section 133 data.position(8); 136 data.position(offset); 186 public Section open(int position) { argument 187 if (position < 0 || position >= data.capacity()) { 188 throw new IllegalArgumentException("position=" + position 193 sectionData.position(position); [all...] |
/libcore/ojluni/src/main/java/sun/nio/ch/ |
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...] |