/libcore/ojluni/src/main/java/java/nio/ |
H A D | Buffer.java | 84 * <p> A buffer's <i>mark</i> is the index to which its position will be reset 85 * when the {@link #reset reset} method is invoked. The mark is not always 87 * than the position. If the mark is defined then it is discarded when the 88 * position or the limit is adjusted to a value smaller than the mark. If the 89 * mark is not defined then invoking the {@link #reset reset} method causes an 95 * <p> The following invariant holds for the mark, position, limit, and 100 * <i>mark</i> <tt><=</tt> 106 * <p> A newly-created buffer always has a position of zero and a mark that is 142 * content to be changed, but its mark, position, and limit values are mutable. 185 // Invariants: mark < 186 private int mark = -1; field in class:Buffer 209 Buffer(int mark, int pos, int lim, int cap, int elementSizeShift) argument 302 public final Buffer mark() { method in class:Buffer [all...] |
H A D | MappedByteBuffer.java | 82 MappedByteBuffer(int mark, int pos, int lim, int cap, // package-private argument 85 super(mark, pos, lim, cap); 90 MappedByteBuffer(int mark, int pos, int lim, int cap, byte[] buf, int offset) { argument 91 super(mark, pos, lim, cap, buf, offset); 95 MappedByteBuffer(int mark, int pos, int lim, int cap) { // package-private argument 96 super(mark, pos, lim, cap);
|
H A D | DoubleBuffer.java | 105 // Creates a new buffer with the given mark, position, limit, capacity, 108 DoubleBuffer(int mark, int pos, int lim, int cap, // package-private argument 111 super(mark, pos, lim, cap, 3); 116 // Creates a new buffer with the given mark, position, limit, and capacity 118 DoubleBuffer(int mark, int pos, int lim, int cap) { // package-private argument 119 this(mark, pos, lim, cap, null, 0); 127 * capacity, its mark will be undefined, and each of its elements will be 152 * will be <tt>offset + length</tt>, and its mark will be undefined. Its 192 * <tt>array.length</tt>, its position will be zero, and its mark will be 213 * buffer, and vice versa; the two buffers' position, limit, and mark [all...] |
H A D | FloatBuffer.java | 105 // Creates a new buffer with the given mark, position, limit, capacity, 108 FloatBuffer(int mark, int pos, int lim, int cap, // package-private argument 111 super(mark, pos, lim, cap, 2); 116 // Creates a new buffer with the given mark, position, limit, and capacity 118 FloatBuffer(int mark, int pos, int lim, int cap) { // package-private argument 119 this(mark, pos, lim, cap, null, 0); 127 * capacity, its mark will be undefined, and each of its elements will be 152 * will be <tt>offset + length</tt>, and its mark will be undefined. Its 192 * <tt>array.length</tt>, its position will be zero, and its mark will be 213 * buffer, and vice versa; the two buffers' position, limit, and mark [all...] |
H A D | HeapCharBuffer.java | 63 int mark, int pos, int lim, int cap, 65 this(buf, mark, pos, lim, cap, off, false); 69 int mark, int pos, int lim, int cap, 71 super(mark, pos, lim, cap, buf, off); 62 HeapCharBuffer(char[] buf, int mark, int pos, int lim, int cap, int off) argument 68 HeapCharBuffer(char[] buf, int mark, int pos, int lim, int cap, int off, boolean isReadOnly) argument
|
H A D | HeapDoubleBuffer.java | 53 int mark, int pos, int lim, int cap, 55 this(buf, mark, pos, lim, cap, off, false); 69 int mark, int pos, int lim, int cap, 71 super(mark, pos, lim, cap, buf, off); 52 HeapDoubleBuffer(double[] buf, int mark, int pos, int lim, int cap, int off) argument 68 HeapDoubleBuffer(double[] buf, int mark, int pos, int lim, int cap, int off, boolean isReadOnly) argument
|
H A D | HeapFloatBuffer.java | 63 int mark, int pos, int lim, int cap, 65 this(buf, mark, pos, lim, cap, off, false); 69 int mark, int pos, int lim, int cap, 71 super(mark, pos, lim, cap, buf, off); 62 HeapFloatBuffer(float[] buf, int mark, int pos, int lim, int cap, int off) argument 68 HeapFloatBuffer(float[] buf, int mark, int pos, int lim, int cap, int off, boolean isReadOnly) argument
|
H A D | HeapIntBuffer.java | 63 int mark, int pos, int lim, int cap, 65 this(buf, mark, pos, lim, cap, off, false); 69 int mark, int pos, int lim, int cap, 71 super(mark, pos, lim, cap, buf, off); 62 HeapIntBuffer(int[] buf, int mark, int pos, int lim, int cap, int off) argument 68 HeapIntBuffer(int[] buf, int mark, int pos, int lim, int cap, int off, boolean isReadOnly) argument
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
H A D | AtomicMarkableReferenceTest.java | 28 * constructor initializes to given reference and mark 40 * get returns the last values of reference and mark set 43 boolean[] mark = new boolean[1]; 47 assertSame(one, ai.get(mark)); 48 assertFalse(mark[0]); 52 assertSame(two, ai.get(mark)); 53 assertFalse(mark[0]); 57 assertSame(one, ai.get(mark)); 58 assertTrue(mark[0]); 65 boolean[] mark [all...] |
H A D | AtomicStampedReferenceTest.java | 43 int[] mark = new int[1]; 47 assertSame(one, ai.get(mark)); 48 assertEquals(0, mark[0]); 52 assertSame(two, ai.get(mark)); 53 assertEquals(0, mark[0]); 57 assertSame(one, ai.get(mark)); 58 assertEquals(1, mark[0]); 65 int[] mark = new int[1]; 70 assertSame(one, ai.get(mark)); 71 assertEquals(1, mark[ [all...] |
/libcore/ojluni/src/main/java/java/util/concurrent/atomic/ |
H A D | AtomicMarkableReference.java | 40 * along with a mark bit, that can be updated atomically. 54 final boolean mark; field in class:AtomicMarkableReference.Pair 55 private Pair(T reference, boolean mark) { argument 57 this.mark = mark; 59 static <T> Pair<T> of(T reference, boolean mark) { argument 60 return new Pair<T>(reference, mark); 71 * @param initialMark the initial mark 87 * Returns the current value of the mark. 89 * @return the current value of the mark [all...] |
/libcore/ojluni/src/main/java/java/io/ |
H A D | ByteArrayInputStream.java | 69 * position within the buffer by the <code>mark()</code> method. 73 * If no mark has been set, then the value of mark is the offset 78 protected int mark = 0; field in class:ByteArrayInputStream 116 * The buffer array is not copied. The buffer's mark is 127 this.mark = offset; 236 * Tests if this <code>InputStream</code> supports mark/reset. The 252 * If no mark has been set, then the value of the mark is the 261 public void mark(in method in class:ByteArrayInputStream [all...] |
H A D | FilterReader.java | 96 * Tells whether this stream supports the mark() operation. 107 public void mark(int readAheadLimit) throws IOException { method in class:FilterReader 108 in.mark(readAheadLimit);
|
H A D | StringReader.java | 41 private int mark = 0; field in class:StringReader 150 * Tells whether this stream supports the mark() operation, which it does. 161 * read while still preserving the mark. Because 169 public void mark(int readAheadLimit) throws IOException { method in class:StringReader 175 mark = next; 180 * Resets the stream to the most recent mark, or to the beginning of the 188 next = mark; 195 * ready(), mark(), or reset() invocations will throw an IOException.
|
H A D | FilterInputStream.java | 190 * allow that many bytes to be read before the mark position gets 193 * This method simply performs <code>in.mark(readlimit)</code>. 196 * the mark position becomes invalid. 200 public synchronized void mark(int readlimit) { method in class:FilterInputStream 201 in.mark(readlimit); 206 * <code>mark</code> method was last called on this input stream. 221 * mark has been invalidated. 223 * @see java.io.FilterInputStream#mark(int) 230 * Tests if this input stream supports the <code>mark</code> 236 * <code>mark</cod [all...] |
H A D | LineNumberInputStream.java | 249 * The {@code mark} method of 251 * number in a private variable, and then calls the {@code mark} 255 * the mark position becomes invalid. 259 public void mark(int readlimit) { method in class:LineNumberInputStream 262 in.mark(readlimit); 267 * {@code mark} method was last called on this input stream. 271 * the line number at the time the {@code mark} method was 286 * @see java.io.LineNumberInputStream#mark(int)
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
H A D | ByteArrayInputStreamTest.java | 54 assertEquals(444, SubByteArrayInputStream.mark); 61 public static int mark, pos, count; field in class:ByteArrayInputStreamTest.SubByteArrayInputStream 67 mark = super.mark; 91 * ByteArrayInputStream#mark(int) 97 is.mark(1000); 102 assertTrue("Failed to mark correct position", new String(buf1, 0, 129 is.mark(100); 141 is.mark(200);
|
H A D | BufferedInputStreamTest.java | 242 * java.io.BufferedInputStream#mark(int) 248 is.mark(500); 253 assertTrue("Failed to mark correct position", new String(buf1, 0, 263 in.mark(14); 270 in.mark(8); 277 buf.mark(3); 288 buf.mark(3); 301 buf.mark(Integer.MAX_VALUE); 385 is.mark(500); 435 is.mark(200 [all...] |
H A D | LineNumberInputStreamTest.java | 72 * java.io.LineNumberInputStream#mark(int) 75 lnis.mark(40); 78 assertEquals("Failed to mark", 0, lnis.getLineNumber()); 79 assertEquals("Failed to mark", '0', lnis.read()); 113 lnis.mark(40); 122 lnis.mark(5); 125 fail("Failed to invalidate mark"); 127 // Correct mark has been invalidated 159 * than the readlimit in mark inorder for IOException to be thrown
|
H A D | PushbackInputStreamTest.java | 45 pb.mark(Integer.MAX_VALUE); 46 pb.mark(0); 47 pb.mark(-1); 48 pb.mark(Integer.MIN_VALUE);
|
/libcore/luni/src/test/java/libcore/java/io/ |
H A D | OldByteArrayInputStreamTest.java | 59 assertEquals(444, SubByteArrayInputStream.mark); 66 public static int mark, pos, count; field in class:OldByteArrayInputStreamTest.SubByteArrayInputStream 72 mark = super.mark; 103 // Test for method void java.io.ByteArrayInputStream.mark(int) 108 is.mark(1000); 113 assertTrue("Failed to mark correct position", new String(buf1, 0, 117 fail("Exception during mark test"); 143 is.mark(100); 184 is.mark(20 [all...] |
H A D | OldLineNumberReaderTest.java | 35 lnr.mark(100); 43 lnr.mark(42); 49 // The spec does not say the mark has to be invalidated 145 lnr.mark(100); 151 lnr.mark(100);
|
H A D | OldLineNumberInputStreamTest.java | 112 lnis.mark(40); 120 lnis.mark(5); 123 fail("Test 3: Failed to invalidate mark."); 125 // Correct; mark has been invalidated. 128 lnis.mark(5); 171 * than the readlimit in mark inorder for IOException to be thrown
|
H A D | OldStringReaderTest.java | 32 sr.mark(-1);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/ |
H A D | AbstractBufferTest.java | 125 baseBuf.mark(); 130 // mark should be valid 136 baseBuf.mark(); 140 // mark should be invalid 172 Buffer ret = baseBuf.mark(); 175 baseBuf.mark(); 180 baseBuf.mark(); 219 baseBuf.mark(); 232 baseBuf.mark(); 235 // mark shoul [all...] |