Lines Matching refs:mark

82  * <p> A buffer's <i>mark</i> is the index to which its position will be reset
83 * when the {@link #reset reset} method is invoked. The mark is not always
85 * than the position. If the mark is defined then it is discarded when the
86 * position or the limit is adjusted to a value smaller than the mark. If the
87 * mark is not defined then invoking the {@link #reset reset} method causes an
93 * <p> The following invariant holds for the mark, position, limit, and
98 * <i>mark</i> <tt>&lt;=</tt>
104 * <p> A newly-created buffer always has a position of zero and a mark that is
140 * content to be changed, but its mark, position, and limit values are mutable.
176 // Invariants: mark <= position <= limit <= capacity
177 private int mark = -1;
186 // Creates a new buffer with the given mark, position, limit, and capacity,
189 Buffer(int mark, int pos, int lim, int cap) { // package-private
195 if (mark >= 0) {
196 if (mark > pos)
197 throw new IllegalArgumentException("mark > position: ("
198 + mark + " > " + pos + ")");
199 this.mark = mark;
222 * Sets this buffer's position. If the mark is defined and larger than the
238 if (mark > position) mark = -1;
253 * then it is set to the new limit. If the mark is defined and larger than
270 if (mark > limit) mark = -1;
275 * Sets this buffer's mark at its position. </p>
279 public final Buffer mark() {
280 mark = position;
287 * <p> Invoking this method neither changes nor discards the mark's
293 * If the mark has not been set
296 int m = mark;
305 * the capacity, and the mark is discarded.
323 mark = -1;
329 * the position is set to zero. If the mark is defined then it is
351 mark = -1;
356 * Rewinds this buffer. The position is set to zero and the mark is
372 mark = -1;
543 return mark;
547 mark = -1;
554 mark = -1;