Searched defs:position (Results 1 - 25 of 41) sorted by relevance

12

/libcore/ojluni/src/main/java/java/nio/channels/
H A DFileLock.java64 * 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>&nbsp;+&nbsp;<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 DSeekableByteChannel.java32 * 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 DAsynchronousFileChannel.java49 * <p> An asynchronous file channel does not have a <i>current position</i>
50 * within the file. Instead, the file position is specified to each read and
397 * <p> The region specified by the {@code position} and {@code size}
430 * @param position
431 * The position at which the locked region is to start; must be
435 * {@code position}&nbsp;+&nbsp;{@code size} must be non-negative
457 public abstract <A> void lock(long position, argument
508 * @param position
509 * The position at which the locked region is to start; must be
513 * {@code position}
532 lock(long position, long size, boolean shared) argument
606 tryLock(long position, long size, boolean shared) argument
676 read(ByteBuffer dst, long position, A attachment, CompletionHandler<Integer,? super A> handler) argument
711 read(ByteBuffer dst, long position) argument
742 write(ByteBuffer src, long position, A attachment, CompletionHandler<Integer,? super A> handler) argument
778 write(ByteBuffer src, long position) argument
[all...]
H A DFileChannel.java43 * 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/text/
H A DCharacterIterator.java82 * 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/ojluni/src/main/java/sun/nio/ch/
H A DFileLockImpl.java36 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 DNativeDispatcher.java43 * position sensitive methods.
49 int pread(FileDescriptor fd, long address, int len, long position) argument
61 int pwrite(FileDescriptor fd, long address, int len, long position) argument
H A DAsynchronousFileChannelImpl.java106 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 DFileLockTable.java152 checkList(list, fl.position(), fl.size());
248 private void checkList(List<FileLockReference> list, long position, long size) argument
254 if (fl != null && fl.overlaps(position, size))
H A DIOUtil.java46 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...]
H A DIOVecWrapper.java57 // Buffers and position/remaining corresponding to elements in iovec array
59 private final int[] position; field in class:IOVecWrapper
88 this.position = new int[size];
112 this.position[i] = pos;
125 return position[i];
H A DSimpleAsynchronousFileChannelImpl.java173 <A> Future<FileLock> implLock(final long position, argument
185 final FileLockImpl fli = addToFileLockTable(position, size, shared);
206 n = nd.lock(fdObj, true, position, size, shared);
243 public FileLock tryLock(long position, long size, boolean shared) argument
252 FileLockImpl fli = addToFileLockTable(position, size, shared);
262 n = nd.lock(fdObj, false, position, size, shared);
284 nd.release(fdObj, fli.position(), fli.size());
289 final long position,
293 if (position < 0)
294 throw new IllegalArgumentException("Negative position");
288 implRead(final ByteBuffer dst, final long position, final A attachment, final CompletionHandler<Integer,? super A> handler) argument
344 implWrite(final ByteBuffer src, final long position, final A attachment, final CompletionHandler<Integer,? super A> handler) argument
[all...]
/libcore/luni/src/test/java/libcore/java/io/
H A DOldOutputStreamTest.java29 private int position; field in class:OldOutputStreamTest.BasicOutputStream
33 position = 0;
37 if (position < BUFFER_SIZE) {
38 buffer[position] = (byte) (oneByte & 255);
39 position++;
H A DOldInputStreamTest.java34 private int position; field in class:OldInputStreamTest.MockInputStream
39 position = 0;
44 if (position < input.length) {
45 result = input[position];
46 position++;
/libcore/ojluni/src/main/java/java/sql/
H A DBlob.java50 * determining the position of a pattern of bytes within a
78 * consecutive bytes starting at position <code>pos</code>.
80 * @param pos the ordinal position of the first byte in the
82 * position 1
88 * byte at position <code>pos</code>
114 * Retrieves the byte position at which the specified byte array
117 * search for <code>pattern</code> begins at position
121 * @param start the position at which to begin searching; the
122 * first position is 1
123 * @return the position a
130 long position(byte pattern[], long start) throws SQLException; method in interface:Blob
149 long position(Blob pattern, long start) throws SQLException; method in interface:Blob
[all...]
H A DClob.java78 * The substring begins at position
83 * The first character is at position 1.
129 * Retrieves the character position at which the specified substring
132 * begins at position <code>start</code>.
135 * @param start the position at which to begin searching; the first position
137 * @return the position at which the substring appears or -1 if it is not
138 * present; the first position is 1
145 long position(String searchstr, long start) throws SQLException; method in interface:Clob
148 * Retrieves the character position a
164 long position(Clob searchstr, long start) throws SQLException; method in interface:Clob
[all...]
/libcore/support/src/test/java/tests/support/
H A DSupport_OutputStream.java19 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/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
H A DFileLockTest.java42 protected MockFileLock(FileChannel channel, long position, long size, argument
44 super(channel, position, size, shared);
110 * @tests java.nio.channels.FileLock#position()
114 assertEquals(20, fileLock1.position());
116 final long position = ((long) Integer.MAX_VALUE + 1);
117 FileLock fileLock2 = new MockFileLock(readWriteChannel, position, 100,
119 assertEquals(position, fileLock2.position());
129 final long position = 0x0FFFFFFFFFFFFFFFL;
131 FileLock fileLock2 = new MockFileLock(readWriteChannel, position, siz
[all...]
/libcore/luni/src/main/java/libcore/io/
H A DNioBufferIterator.java32 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/ojluni/src/main/java/sun/security/util/
H A DBitArray.java49 private static int position(int idx) { // bits big-endian in each unit method in class:BitArray
132 return (repn[subscript(index)] & position(index)) != 0;
144 int bit = position(index);
/libcore/ojluni/src/main/java/java/nio/
H A DBuffer.java36 * 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...]
/libcore/ojluni/src/main/java/sun/security/x509/
H A DKeyUsageExtension.java83 * @param position the position in the bit string to check.
85 private boolean isSet(int position) { argument
86 return (position < bitString.length) &&
87 bitString[position];
91 * Set the bit at the specified position.
93 private void set(int position, boolean val) { argument
95 if (position >= bitString.length) {
96 boolean[] tmp = new boolean[position+1];
100 bitString[position]
[all...]
H A DNetscapeCertTypeExtension.java93 MapEntry(String name, int position) { argument
95 mPosition = position;
136 * @param position the position in the bit string to check.
138 private boolean isSet(int position) { argument
139 return (position < bitString.length) &&
140 bitString[position];
144 * Set the bit at the specified position.
146 private void set(int position, boolean val) { argument
148 if (position >
[all...]
H A DReasonFlags.java99 * @param position the position in the bit string to check.
101 private boolean isSet(int position) { argument
102 return (position < bitString.length) &&
103 bitString[position];
107 * Set the bit at the specified position.
109 private void set(int position, boolean val) { argument
111 if (position >= bitString.length) {
112 boolean[] tmp = new boolean[position+1];
116 bitString[position]
[all...]
/libcore/ojluni/src/main/native/
H A DFileChannelImpl.c161 jlong position, jlong count,
168 off64_t offset = (off64_t)position;
189 sfv.sfv_off = (off64_t)position;
218 result = sendfile(srcFD, dstFD, position, &numBytes, NULL, 0);
243 if (position > max)
251 sf_iobuf.file_offset = (off_t)position;
159 FileChannelImpl_transferTo0(JNIEnv *env, jobject this, jobject srcFDO, jlong position, jlong count, jobject dstFDO) argument

Completed in 321 milliseconds

12