Searched refs:mark (Results 1 - 25 of 85) sorted by relevance

1234

/libcore/jsr166-tests/src/test/java/jsr166/
H A DAtomicMarkableReferenceTest.java17 * constructor initializes to given reference and mark
29 * get returns the last values of reference and mark set
32 boolean[] mark = new boolean[1];
36 assertSame(one, ai.get(mark));
37 assertFalse(mark[0]);
41 assertSame(two, ai.get(mark));
42 assertFalse(mark[0]);
46 assertSame(one, ai.get(mark));
47 assertTrue(mark[0]);
54 boolean[] mark
[all...]
H A DAtomicStampedReferenceTest.java32 int[] mark = new int[1];
36 assertSame(one, ai.get(mark));
37 assertEquals(0, mark[0]);
41 assertSame(two, ai.get(mark));
42 assertEquals(0, mark[0]);
46 assertSame(one, ai.get(mark));
47 assertEquals(1, mark[0]);
54 int[] mark = new int[1];
59 assertSame(one, ai.get(mark));
60 assertEquals(1, mark[
[all...]
/libcore/luni/src/main/java/java/nio/
H A DBuffer.java37 * while changing the position, limit and mark of a read-only buffer is OK.</li>
49 * <code>UNSET_MARK</code> means the mark has not been set.
69 int mark = UNSET_MARK; field in class:Buffer
204 * and mark is cleared.
210 mark = UNSET_MARK;
219 * zero, and the mark is cleared.
228 mark = UNSET_MARK;
286 * been adjusted to be equivalent to <code>newLimit</code>. If the mark
305 if ((mark != UNSET_MARK) && (mark > newLimi
317 public final Buffer mark() { method in class:Buffer
[all...]
H A DCharArrayBuffer.java46 buf.mark = markOfOther;
51 return copy(this, mark, true);
61 mark = UNSET_MARK;
66 return copy(this, mark, isReadOnly);
H A DDoubleArrayBuffer.java46 buf.mark = markOfOther;
51 return copy(this, mark, true);
61 mark = UNSET_MARK;
66 return copy(this, mark, isReadOnly);
H A DFloatArrayBuffer.java46 buf.mark = markOfOther;
51 return copy(this, mark, true);
62 mark = UNSET_MARK;
67 return copy(this, mark, isReadOnly);
H A DIntArrayBuffer.java46 buf.mark = markOfOther;
51 return copy(this, mark, true);
61 mark = UNSET_MARK;
66 return copy(this, mark, isReadOnly);
H A DLongArrayBuffer.java46 buf.mark = markOfOther;
51 return copy(this, mark, true);
61 mark = UNSET_MARK;
66 return copy(this, mark, isReadOnly);
H A DShortArrayBuffer.java46 buf.mark = markOfOther;
51 return copy(this, mark, true);
61 mark = UNSET_MARK;
66 return copy(this, mark, isReadOnly);
/libcore/luni/src/main/java/java/util/concurrent/atomic/
H A DAtomicMarkableReference.java11 * along with a mark bit, that can be updated atomically.
25 final boolean mark; field in class:AtomicMarkableReference.Pair
26 private Pair(T reference, boolean mark) { argument
28 this.mark = mark;
30 static <T> Pair<T> of(T reference, boolean mark) { argument
31 return new Pair<T>(reference, mark);
42 * @param initialMark the initial mark
58 * Returns the current value of the mark.
60 * @return the current value of the mark
[all...]
/libcore/luni/src/main/java/java/util/jar/
H A DManifestReader.java58 int mark = pos;
84 chunks.put(entryNameValue, new Manifest.Chunk(mark, pos));
85 mark = pos;
114 int mark = pos;
121 String nameString = new String(buf, mark, pos - mark - 1, StandardCharsets.US_ASCII);
143 int mark = pos;
164 valueBuffer.write(buf, mark, last - mark);
165 mark
[all...]
/libcore/luni/src/main/java/java/io/
H A DByteArrayInputStream.java39 * The current mark position. Initially set to 0 or the <code>offset</code>
42 protected int mark; field in class:ByteArrayInputStream
58 this.mark = 0;
78 mark = offset;
104 * Sets a mark position in this ByteArrayInputStream. The parameter
114 public synchronized void mark(int readlimit) { method in class:ByteArrayInputStream
115 mark = pos;
119 * Indicates whether this stream supports the {@code mark()} and
124 * @see #mark(int)
166 * @see #mark(in
[all...]
H A DBufferedReader.java49 * mark pos end</pre>
55 * value is in the range {@code [0...pos]}. If the mark is {@code -1}, the
58 * <p>MarkLimit limits the distance between the mark and the pos. When this
69 private int mark = -1; field in class:BufferedReader
83 * We also need to keep the 'lastWasCR' state for the mark position, in case
143 if (mark == -1 || (pos - mark >= markLimit)) {
144 /* mark isn't set or has exceeded its limit. use the whole buffer */
147 mark = -1;
154 if (mark
206 public void mark(int markLimit) throws IOException { method in class:BufferedReader
[all...]
H A DFilterInputStream.java68 * Sets a mark position in this stream. The parameter {@code readlimit}
69 * indicates how many bytes can be read before the mark is invalidated.
73 * This implementation sets a mark in the filtered stream.
77 * the mark is invalidated.
82 public synchronized void mark(int readlimit) { method in class:FilterInputStream
83 in.mark(readlimit);
87 * Indicates whether this stream supports {@code mark()} and {@code reset()}.
91 * @return {@code true} if {@code mark()} and {@code reset()} are supported,
93 * @see #mark(int)
126 * if this stream is already closed, no mark ha
[all...]
H A DFilterReader.java62 * Sets a mark position in this reader. The parameter {@code readlimit}
63 * indicates how many bytes can be read before the mark is invalidated.
67 * This implementation sets a mark in the filtered reader.
71 * the mark is invalidated.
78 public synchronized void mark(int readlimit) throws IOException { method in class:FilterReader
80 in.mark(readlimit);
85 * Indicates whether this reader supports {@code mark()} and {@code reset()}.
88 * @return {@code true} if {@code mark()} and {@code reset()} are supported
90 * @see #mark(int)
161 * {@code mark()} an
[all...]
H A DLineNumberInputStream.java80 * Sets a mark position in this stream. The parameter {@code readlimit}
81 * indicates how many bytes can be read before the mark is invalidated.
87 * This implementation sets a mark in the filtered stream.
91 * the mark is invalidated.
96 public void mark(int readlimit) { method in class:LineNumberInputStream
97 in.mark(readlimit);
184 * if this stream is already closed, no mark has been set or the
185 * mark is no longer valid because more than {@code readlimit}
186 * bytes have been read since setting the mark.
187 * @see #mark(in
[all...]
H A DLineNumberReader.java74 * Sets a mark position in this reader. The parameter {@code readlimit}
75 * indicates how many characters can be read before the mark is invalidated.
83 * before the mark is invalidated.
85 * if an error occurs while setting the mark in this reader.
90 public void mark(int readlimit) throws IOException { method in class:LineNumberReader
92 super.mark(readlimit);
204 * if this reader is already closed, no mark has been set or the
205 * mark is no longer valid because more than {@code readlimit}
206 * bytes have been read since setting the mark.
207 * @see #mark(in
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DByteArrayInputStreamTest.java54 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 DBufferedInputStreamTest.java242 * 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 DLineNumberInputStreamTest.java72 * 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
/libcore/luni/src/main/java/libcore/net/url/
H A DFtpURLInputStream.java56 public synchronized void mark(int limit) { method in class:FtpURLInputStream
57 is.mark(limit);
/libcore/luni/src/test/java/libcore/java/io/
H A DOldByteArrayInputStreamTest.java59 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 DOldLineNumberReaderTest.java35 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);
/libcore/luni/src/main/java/java/net/
H A DHttpURLConnection.java618 int mark = response.indexOf(" ") + 1;
619 if (mark == 0) {
622 int last = mark + 3;
626 responseCode = Integer.parseInt(response.substring(mark, last));
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/
H A DAbstractBufferTest.java125 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...]

Completed in 993 milliseconds

1234