Home
last modified time | relevance | path

Searched refs:position (Results 1 – 25 of 152) sorted by relevance

1234567

/libcore/ojluni/src/main/java/java/nio/
DBuffer.java186 int position = 0; field in Buffer
210 position(pos); in Buffer()
234 public final int position() { in position() method in Buffer
235 return position; in position()
247 public final Buffer position(int newPosition) { in position() method in Buffer
250 position = newPosition; in position()
251 if (mark > position) mark = -1; in position()
278 if (position > limit) position = limit; in limit()
289 mark = position; in mark()
306 position = m; in reset()
[all …]
DHeapLongBuffer.java82 this.position() + offset, in slice()
89 this.position(), in duplicate()
99 this.position(), in asReadOnlyBuffer()
122 System.arraycopy(hb, ix(position()), dst, offset, length); in get()
123 position(position() + length); in get()
158 System.arraycopy(src, offset, hb, ix(position()), length); in put()
159 position(position() + length); in put()
174 System.arraycopy(sb.hb, sb.ix(sb.position()), in put()
175 hb, ix(position()), n); in put()
176 sb.position(sb.position() + n); in put()
[all …]
DHeapShortBuffer.java81 this.position() + offset, in slice()
88 this.position(), in duplicate()
99 this.position(), in asReadOnlyBuffer()
121 System.arraycopy(hb, ix(position()), dst, offset, length); in get()
122 position(position() + length); in get()
157 System.arraycopy(src, offset, hb, ix(position()), length); in put()
158 position(position() + length); in put()
173 System.arraycopy(sb.hb, sb.ix(sb.position()), in put()
174 hb, ix(position()), n); in put()
175 sb.position(sb.position() + n); in put()
[all …]
DHeapDoubleBuffer.java82 this.position() + offset, in slice()
89 this.position(), in duplicate()
99 this.position(), in asReadOnlyBuffer()
121 System.arraycopy(hb, ix(position()), dst, offset, length); in get()
122 position(position() + length); in get()
157 System.arraycopy(src, offset, hb, ix(position()), length); in put()
158 position(position() + length); in put()
173 System.arraycopy(sb.hb, sb.ix(sb.position()), in put()
174 hb, ix(position()), n); in put()
175 sb.position(sb.position() + n); in put()
[all …]
DHeapFloatBuffer.java81 this.position() + offset, in slice()
88 this.position(), in duplicate()
98 this.position(), in asReadOnlyBuffer()
120 System.arraycopy(hb, ix(position()), dst, offset, length); in get()
121 position(position() + length); in get()
156 System.arraycopy(src, offset, hb, ix(position()), length); in put()
157 position(position() + length); in put()
172 System.arraycopy(sb.hb, sb.ix(sb.position()), in put()
173 hb, ix(position()), n); in put()
174 sb.position(sb.position() + n); in put()
[all …]
DHeapIntBuffer.java81 this.position() + offset, in slice()
88 this.position(), in duplicate()
99 this.position(), in asReadOnlyBuffer()
121 System.arraycopy(hb, ix(position()), dst, offset, length); in get()
122 position(position() + length); in get()
157 System.arraycopy(src, offset, hb, ix(position()), length); in put()
158 position(position() + length); in put()
173 System.arraycopy(sb.hb, sb.ix(sb.position()), in put()
174 hb, ix(position()), n); in put()
175 sb.position(sb.position() + n); in put()
[all …]
DHeapCharBuffer.java81 this.position() + offset, in slice()
88 this.position(), in duplicate()
99 this.position(), in asReadOnlyBuffer()
126 System.arraycopy(hb, ix(position()), dst, offset, length); in get()
127 position(position() + length); in get()
162 System.arraycopy(src, offset, hb, ix(position()), length); in put()
163 position(position() + length); in put()
178 System.arraycopy(sb.hb, sb.ix(sb.position()), in put()
179 hb, ix(position()), n); in put()
180 sb.position(sb.position() + n); in put()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/
DAbstractBufferTest.java42 assertTrue(0 <= baseBuf.position() && baseBuf.position() <= baseBuf.limit() in testCapacity()
48 int oldPosition = baseBuf.position(); in testClear()
53 assertEquals(baseBuf.position(), 0); in testClear()
64 baseBuf.position(oldPosition); in testClear()
69 int oldPosition = baseBuf.position(); in testFlip()
74 assertEquals(baseBuf.position(), 0); in testFlip()
85 baseBuf.position(oldPosition); in testFlip()
90 int oldPosition = baseBuf.position(); in testHasRemaining()
93 assertEquals(baseBuf.hasRemaining(), baseBuf.position() < baseBuf.limit()); in testHasRemaining()
94 baseBuf.position(baseBuf.limit()); in testHasRemaining()
[all …]
DFloatBufferTest.java87 buf.position(buf.limit()); in testAsReadOnlyBuffer()
93 assertEquals(buf.position(), readonly.position()); in testAsReadOnlyBuffer()
101 assertEquals(readonly.position(), 0); in testAsReadOnlyBuffer()
103 assertEquals(buf.position(), buf.limit()); in testAsReadOnlyBuffer()
105 assertEquals(buf.position(), 0); in testAsReadOnlyBuffer()
116 assertEquals(buf.position(), buf.capacity()); in testCompact()
127 buf.position(0); in testCompact()
132 assertEquals(buf.position(), 0); in testCompact()
144 buf.position(1); in testCompact()
149 assertEquals(buf.position(), 4); in testCompact()
[all …]
DLongBufferTest.java87 buf.position(buf.limit()); in testAsReadOnlyBuffer()
93 assertEquals(buf.position(), readonly.position()); in testAsReadOnlyBuffer()
101 assertEquals(readonly.position(), 0); in testAsReadOnlyBuffer()
103 assertEquals(buf.position(), buf.limit()); in testAsReadOnlyBuffer()
105 assertEquals(buf.position(), 0); in testAsReadOnlyBuffer()
115 assertEquals(buf.position(), buf.capacity()); in testCompact()
126 buf.position(0); in testCompact()
131 assertEquals(buf.position(), 0); in testCompact()
143 buf.position(1); in testCompact()
148 assertEquals(buf.position(), 4); in testCompact()
[all …]
DShortBufferTest.java86 buf.position(buf.limit()); in testAsReadOnlyBuffer()
92 assertEquals(buf.position(), readonly.position()); in testAsReadOnlyBuffer()
100 assertEquals(readonly.position(), 0); in testAsReadOnlyBuffer()
102 assertEquals(buf.position(), buf.limit()); in testAsReadOnlyBuffer()
104 assertEquals(buf.position(), 0); in testAsReadOnlyBuffer()
114 assertEquals(buf.position(), buf.capacity()); in testCompact()
125 buf.position(0); in testCompact()
130 assertEquals(buf.position(), 0); in testCompact()
142 buf.position(1); in testCompact()
147 assertEquals(buf.position(), 4); in testCompact()
[all …]
DIntBufferTest.java87 buf.position(buf.limit()); in testAsReadOnlyBuffer()
93 assertEquals(buf.position(), readonly.position()); in testAsReadOnlyBuffer()
101 assertEquals(readonly.position(), 0); in testAsReadOnlyBuffer()
103 assertEquals(buf.position(), buf.limit()); in testAsReadOnlyBuffer()
105 assertEquals(buf.position(), 0); in testAsReadOnlyBuffer()
115 assertEquals(buf.position(), buf.capacity()); in testCompact()
126 buf.position(0); in testCompact()
131 assertEquals(buf.position(), 0); in testCompact()
143 buf.position(1); in testCompact()
148 assertEquals(buf.position(), 4); in testCompact()
[all …]
DDoubleBufferTest.java111 buf.position(buf.limit()); in testAsReadOnlyBuffer()
117 assertEquals(buf.position(), readonly.position()); in testAsReadOnlyBuffer()
125 assertEquals(readonly.position(), 0); in testAsReadOnlyBuffer()
127 assertEquals(buf.position(), buf.limit()); in testAsReadOnlyBuffer()
129 assertEquals(buf.position(), 0); in testAsReadOnlyBuffer()
139 assertEquals(buf.position(), buf.capacity()); in testCompact()
150 buf.position(0); in testCompact()
155 assertEquals(buf.position(), 0); in testCompact()
167 buf.position(1); in testCompact()
172 assertEquals(buf.position(), 4); in testCompact()
[all …]
/libcore/ojluni/src/main/java/java/nio/channels/
DFileLock.java119 private final long position; field in FileLock
145 long position, long size, boolean shared) in FileLock() argument
147 if (position < 0) in FileLock()
151 if (position + size < 0) in FileLock()
154 this.position = position; in FileLock()
193 public final long position() { in position() method in FileLock
194 return position; in position()
226 public final boolean overlaps(long position, long size) { in overlaps() argument
227 if (position + size <= this.position) in overlaps()
229 if (this.position + this.size <= position) in overlaps()
[all …]
DFileChannel.java255 public abstract long position() throws IOException; in position() method in FileChannel
283 public abstract FileChannel position(long newPosition) throws IOException; in position() method in FileChannel
441 public abstract long transferTo(long position, long count, in transferTo() argument
509 long position, long count) in transferFrom() argument
555 public abstract int read(ByteBuffer dst, long position) throws IOException; in read() argument
600 public abstract int write(ByteBuffer src, long position) throws IOException; in write() argument
738 long position, long size) in map() argument
833 public abstract FileLock lock(long position, long size, boolean shared) in lock() argument
944 public abstract FileLock tryLock(long position, long size, boolean shared) in tryLock() argument
/libcore/luni/src/main/java/libcore/io/
DNioBufferIterator.java32 private int position; field in NioBufferIterator
41 position = offset; in seek()
45 position += byteCount; in skip()
49 Memory.peekByteArray(address + position, dst, dstOffset, byteCount); in readByteArray()
50 position += byteCount; in readByteArray()
54 byte result = Memory.peekByte(address + position); in readByte()
55 ++position; in readByte()
60 int result = Memory.peekInt(address + position, swap); in readInt()
61 position += SizeOf.INT; in readInt()
66 Memory.peekIntArray(address + position, dst, dstOffset, intCount, swap); in readIntArray()
[all …]
/libcore/luni/src/test/resources/out_dh/
Dstaff.out45position$position^$salary$salary^$gender$gender^$address$address^$employee$employee^$employeeId$em…
/libcore/ojluni/src/main/java/java/util/
DStringTokenizer.java248 int position = startPos; in skipDelimiters() local
249 while (!retDelims && position < maxPosition) { in skipDelimiters()
251 char c = str.charAt(position); in skipDelimiters()
254 position++; in skipDelimiters()
256 int c = str.codePointAt(position); in skipDelimiters()
260 position += Character.charCount(c); in skipDelimiters()
263 return position; in skipDelimiters()
271 int position = startPos; in scanToken() local
272 while (position < maxPosition) { in scanToken()
274 char c = str.charAt(position); in scanToken()
[all …]
/libcore/xml/src/main/java/org/kxml2/io/
DKXmlParser.java143 private int position = 0; field in KXmlParser
467 int start = position; in readUntil()
477 if (position + delimiter.length > limit) { in readUntil()
478 if (start < position && returnText) { in readUntil()
482 result.append(buffer, start, position - start); in readUntil()
489 start = position; in readUntil()
495 if (buffer[position + i] != delimiter[i]) { in readUntil()
496 position++; in readUntil()
504 int end = position; in readUntil()
505 position += delimiter.length; in readUntil()
[all …]
/libcore/dex/src/main/java/com/android/dex/
DDex.java133 data.position(8); in create()
136 data.position(offset); in create()
186 public Section open(int position) { in open() argument
187 if (position < 0 || position >= data.capacity()) { in open()
188 throw new IllegalArgumentException("position=" + position in open()
193 sectionData.position(position); in open()
205 sectionData.position(nextSectionStart); in appendSection()
226 data.position(0); in getBytes()
297 data.position(SIGNATURE_OFFSET + SIGNATURE_SIZE); in computeSignature()
314 data.position(CHECKSUM_OFFSET + CHECKSUM_SIZE); in computeChecksum()
[all …]
/libcore/luni/src/test/java/libcore/java/nio/
DOldAndroidNIOTest.java35 assertTrue(0 <= b.position()); in checkBuffer()
36 assertTrue(b.position() <= b.limit()); in checkBuffer()
98 b.position(0); in byteBufferTest()
108 b.position(0); in byteBufferTest()
118 b.position(b.limit() - 2); in byteBufferTest()
126 b.position(0); in byteBufferTest()
137 b.position(0); in byteBufferTest()
152 b.position(0); in byteBufferTest()
173 b.position(0); in byteBufferTest()
194 b.position(6); in byteBufferTest()
[all …]
/libcore/ojluni/src/main/java/sun/nio/ch/
DIOUtil.java46 static int write(FileDescriptor fd, ByteBuffer src, long position, in write() argument
51 return writeFromNativeBuffer(fd, src, position, nd); in write()
54 int pos = src.position(); in write()
63 src.position(pos); in write()
65 int n = writeFromNativeBuffer(fd, bb, position, nd); in write()
68 src.position(pos + n); in write()
77 long position, NativeDispatcher nd) in writeFromNativeBuffer() argument
80 int pos = bb.position(); in writeFromNativeBuffer()
88 if (position != -1) { in writeFromNativeBuffer()
91 rem, position); in writeFromNativeBuffer()
[all …]
DFileChannelImpl.java121 nd.release(fd, fl.position(), fl.size()); in implCloseChannel()
258 public long position() throws IOException { in position() method in FileChannelImpl
284 public FileChannel position(long newPosition) throws IOException { in position() method in FileChannelImpl
421 private long transferToDirectly(long position, int icount, in transferToDirectly() argument
455 n = transferTo0(thisFDVal, position, icount, targetFDVal); in transferToDirectly()
479 private long transferToTrustedChannel(long position, long count, in transferToTrustedChannel() argument
492 MappedByteBuffer dbb = map(MapMode.READ_ONLY, position, size); in transferToTrustedChannel()
503 position += n; in transferToTrustedChannel()
527 private long transferToArbitraryChannel(long position, int icount, in transferToArbitraryChannel() argument
535 long pos = position; in transferToArbitraryChannel()
[all …]
/libcore/support/src/test/java/tests/support/
DSupport_OutputStream.java19 private int position; field in Support_OutputStream
36 position = 0; in Support_OutputStream()
85 if (position < size) { in write()
86 buffer[position] = (byte)(oneByte & 255); in write()
87 position++; in write()
94 byte[] toReturn = new byte[position]; in toByteArray()
95 System.arraycopy(buffer, 0, toReturn, 0, position); in toByteArray()
100 return new String(buffer, 0, position); in toString()
104 return position; in size()
/libcore/benchmarks/src/benchmarks/regression/
DByteBufferBenchmark.java76 result.position(aligned ? 0 : 1); in newBuffer()
87 src.position(aligned ? 0 : 1); in timeByteBuffer_getByte()
99 src.position(aligned ? 0 : 1); in timeByteBuffer_getByteArray()
108 src.position(aligned ? 0 : 1); in timeByteBuffer_getByte_indexed()
118 src.position(aligned ? 0 : 1); in timeByteBuffer_getChar()
130 src.position(0); in timeCharBuffer_getCharArray()
139 src.position(aligned ? 0 : 1); in timeByteBuffer_getChar_indexed()
149 src.position(aligned ? 0 : 1); in timeByteBuffer_getDouble()
161 src.position(0); in timeDoubleBuffer_getDoubleArray()
170 src.position(aligned ? 0 : 1); in timeByteBuffer_getFloat()
[all …]

1234567