Searched refs:available (Results 1 - 25 of 151) sorted by relevance

1234567

/libcore/support/src/test/java/tests/support/
H A DSupport_ASimpleReader.java60 int available = len - pos;
61 if (available > 0) {
62 int readable = (available < count ? available : count);
/libcore/ojluni/src/main/java/javax/crypto/
H A DCipherInputStream.java51 * <code>skip</code> method skips, and the <code>available</code>
128 // any more byte available, it returns 0. In case of any exception is raised,
186 * <code>0</code> to <code>255</code>. If no byte is available
189 * is available, the end of the stream is detected, or an exception
231 * available. If the first argument is <code>null,</code> up to
255 int available = ofinish - ostart;
256 if (len < available) available = len;
258 System.arraycopy(obuffer, ostart, b, off, available);
260 ostart = ostart + available;
305 public int available() throws IOException { method in class:CipherInputStream
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
H A DDeflaterInputStreamTest.java60 * DeflaterInputStream#available()
65 assertEquals(1, dis.available());
67 assertEquals(1, dis.available());
69 assertEquals(0, dis.available());
71 assertEquals(0, dis.available());
74 dis.available();
87 assertEquals(1, dis.available());
90 dis.available();
133 assertEquals(1, dis.available());
135 assertEquals(1, dis.available());
[all...]
H A DInflaterInputStreamTest.java238 // InflaterInputStream.available() returns either 1 or 0, even though
239 // that contradicts the behavior defined in InputStream.available()
241 assertEquals(1, in.available());
243 assertEquals(1, in.available());
245 assertEquals(1, in.available());
247 assertEquals(0, in.available());
257 assertEquals(1, in.available());
259 assertEquals(0, in.available());
269 assertEquals(0, in.available());
388 // Test for skipping more bytes than available i
[all...]
/libcore/ojluni/src/main/java/java/io/
H A DObjectInput.java55 * available.
64 * block until some input is available.
74 * block until some input is available.
95 * @return the number of available bytes.
98 public int available() throws IOException; method in interface:ObjectInput
H A DPipedInputStream.java102 * to <code>src</code> will then be available
118 * be available as input from this stream.
196 * available.
220 * block until some input is available.
298 * This method blocks until input data is available, the end of the
357 * available, end of the stream has been detected, or an exception is
392 int available;
395 available = Math.min((buffer.length - out), (in - out));
397 available = buffer.length - out;
401 if (available > (le
433 public synchronized int available() throws IOException { method in class:PipedInputStream
[all...]
H A DFilterInputStream.java68 * <code>0</code> to <code>255</code>. If no byte is available
71 * is available, the end of the stream is detected, or an exception
89 * input is available.
113 * blocks until some input is available; otherwise, no
161 * This method returns the result of {@link #in in}.available().
167 public int available() throws IOException { method in class:FilterInputStream
168 return in.available();
H A DLineNumberInputStream.java70 * {@code 0} to {@code 255}. If no byte is available
73 * is available, the end of the stream is detected, or an exception
115 * into an array of bytes. This method blocks until some input is available.
240 public int available() throws IOException { method in class:LineNumberInputStream
241 return (pushBack == -1) ? super.available()/2 : super.available()/2 + 1;
H A DSequenceInputStream.java126 * This method simply calls {@code available} of the current underlying
137 public int available() throws IOException { method in class:SequenceInputStream
139 return 0; // no way to signal EOF from available()
141 return in.available();
147 * <code>255</code>. If no byte is available because the end of the
149 * This method blocks until input data is available, the end of the
176 * blocks until at least 1 byte of input is available; otherwise, no
/libcore/luni/src/test/java/libcore/java/util/zip/
H A DDeflaterInputStreamTest.java40 assertEquals(1, in.available());
45 assertEquals(0, in.available());
51 in.available();
74 assertEquals(1, in.available());
80 assertEquals(0, in.available());
86 in.available();
H A DZipInputStreamTest.java120 assertEquals(1, zis.available());
122 assertEquals(1, zis.available());
125 // contract for available states that we should return 1 if there are any bytes left to read
127 assertEquals(0, zis.available());
132 assertEquals(0, zis.available());
137 assertEquals(0, zis.available());
141 assertEquals(0, zis.available());
/libcore/ojluni/src/main/java/java/util/concurrent/
H A DSemaphore.java26 * This file is available under and governed by the GNU General Public
44 * available, and then takes it. Each {@link #release} adds a permit,
47 * keeps a count of the number available and acts accordingly.
55 * private final Semaphore available = new Semaphore(MAX_AVAILABLE, true);
58 * available.acquire();
64 * available.release();
97 * the semaphore, guaranteeing that an item is available for use. When
108 * only has at most one permit available, can serve as a mutual
111 * available, or zero permits available
[all...]
H A DDelayQueue.java26 * This file is available under and governed by the GNU General Public
101 * Condition signalled when a newer element becomes available
105 private final Condition available = lock.newCondition(); field in class:DelayQueue
149 available.signal();
204 * until an element with an expired delay is available on this queue.
216 available.await();
223 available.await();
228 available.awaitNanos(delay);
238 available.signal();
245 * until an element with an expired delay is available o
[all...]
/libcore/support/src/test/java/libcore/tlswire/handshake/
H A DEllipticCurvesHelloExtension.java39 wellFormed = (ellipticCurvesListIn.available() % 2) == 0;
40 supported = new ArrayList<EllipticCurve>(ellipticCurvesListIn.available() / 2);
41 while (ellipticCurvesListIn.available() >= 2) {
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DPipedInputStreamTest.java74 pis.available();
101 * java.io.PipedInputStream#available()
115 + pis.available(), pis.available() == 1000);
125 assertEquals("Incorrect available count", 1024, pin.available());
155 assertEquals("Non-conected pipe returned non-zero available bytes", 0,
156 pis.available());
166 .available());
184 .available());
[all...]
H A DBufferedOutputStreamTest.java135 assertEquals("Bytes written, not buffered", 0, bais.available());
138 assertEquals("Bytes not written after flush", 500, bais.available());
142 bais.available() >= 1000);
653 assertEquals("Byte written, not buffered", 0, bais.available());
656 assertEquals("Byte not written after flush", 1, bais.available());
690 assertEquals("Bytes written, not buffered", 10, byteArrayis.available());
694 .available());
701 assertEquals("Bytes written, not buffered", 20, byteArrayis.available());
705 .available());
715 assertEquals("Bytes written, not buffered", 30, byteArrayis.available());
[all...]
H A DByteArrayInputStreamTest.java38 bis.available() == fileString.length());
49 .available());
74 * ByteArrayInputStream#available()
77 assertTrue("Returned incorrect number of available bytes", is
78 .available() == fileString.length());
H A DFilterOutputStreamTest.java83 bis.available() == fileString.length());
100 bis.available() == fileString.length());
116 assertEquals("Byte not written after flush", 1, bis.available());
H A DStringBufferInputStreamTest.java36 * java.io.StringBufferInputStream#available()
39 // Test for method int java.io.StringBufferInputStream.available()
40 assertEquals("Returned incorrect number of available bytes", 11, sbis
41 .available());
/libcore/ojluni/src/main/java/sun/security/util/
H A DDerInputBuffer.java65 int len = available();
108 int max = this.available();
109 if (other.available() != max)
127 int len = available();
136 if (len > available())
150 if (len > available())
200 if (len > available())
226 return getBitString(available());
240 int len = available();
262 if (len > available())
[all...]
/libcore/ojluni/src/main/java/sun/security/x509/
H A DGeneralNames.java60 if (derVal.data.available() == 0) {
61 throw new IOException("No data available in "
65 while (derVal.data.available() != 0) {
H A DSerialNumber.java45 if (derVal.data.available() != 0) {
/libcore/luni/src/test/java/libcore/java/io/
H A DOldBufferedOutputStreamTest.java93 0, bais.available());
97 500, bais.available());
101 bais.available() >= 1000);
161 0, bais.available());
165 1, bais.available());
H A DFilterInputStreamNullSourceTest.java56 assertEquals(0, in.available());
113 in.available();
129 in.available();
/libcore/ojluni/src/main/java/java/util/
H A DCurrency.java64 private static HashSet<Currency> available; field in class:Currency
149 * Gets the set of available currencies. The returned set of currencies
150 * contains all of the available currencies, which may include currencies
152 * without affecting the available currencies in the runtime.
154 * @return the set of available currencies. If there is no currency
155 * available in the runtime, the returned set is empty.
160 if (available == null) {
164 available = new HashSet<>();
171 available.add(currency);
178 Set<Currency> result = (Set<Currency>) available
[all...]

Completed in 635 milliseconds

1234567