Home
last modified time | relevance | path

Searched refs:available (Results 1 – 25 of 158) sorted by relevance

1234567

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
DDeflaterInputStreamTest.java65 assertEquals(1, dis.available()); in testAvailable()
67 assertEquals(1, dis.available()); in testAvailable()
69 assertEquals(0, dis.available()); in testAvailable()
71 assertEquals(0, dis.available()); in testAvailable()
74 dis.available(); in testAvailable()
87 assertEquals(1, dis.available()); in testClose()
90 dis.available(); in testClose()
133 assertEquals(1, dis.available()); in testRead()
135 assertEquals(1, dis.available()); in testRead()
137 assertEquals(1, dis.available()); in testRead()
[all …]
DInflaterInputStreamTest.java241 assertEquals(1, in.available()); in testAvailableNonEmptySource()
243 assertEquals(1, in.available()); in testAvailableNonEmptySource()
245 assertEquals(1, in.available()); in testAvailableNonEmptySource()
247 assertEquals(0, in.available()); in testAvailableNonEmptySource()
257 assertEquals(1, in.available()); in testAvailableSkip()
259 assertEquals(0, in.available()); in testAvailableSkip()
269 assertEquals(0, in.available()); in testAvailableEmptySource()
458 int available; in test_available() local
461 available = iis.available(); in test_available()
462 if (available == 0) { in test_available()
[all …]
/libcore/ojluni/src/main/java/javax/crypto/
DCipherInputStream.java255 int available = ofinish - ostart; in read() local
256 if (len < available) available = len; in read()
258 System.arraycopy(obuffer, ostart, b, off, available); in read()
260 ostart = ostart + available; in read()
261 return available; in read()
283 int available = ofinish - ostart; in skip() local
284 if (n > available) { in skip()
285 n = available; in skip()
305 public int available() throws IOException { in available() method in CipherInputStream
DEncryptedPrivateKeyInfo.java91 if (val.data.available() != 0) { in EncryptedPrivateKeyInfo()
92 throw new IOException("overrun, bytes = " + val.data.available()); in EncryptedPrivateKeyInfo()
96 if (seq[0].data.available() != 0) { in EncryptedPrivateKeyInfo()
101 if (seq[1].data.available() != 0) { in EncryptedPrivateKeyInfo()
421 if (algid.available() != 0) { in checkPKCS8Encoding()
/libcore/ojluni/src/main/java/java/io/
DPipedInputStream.java392 int available; in read() local
395 available = Math.min((buffer.length - out), (in - out)); in read()
397 available = buffer.length - out; in read()
401 if (available > (len - 1)) { in read()
402 available = len - 1; in read()
404 System.arraycopy(buffer, out, b, off + rlen, available); in read()
405 out += available; in read()
406 rlen += available; in read()
407 len -= available; in read()
433 public synchronized int available() throws IOException { in available() method in PipedInputStream
DLineNumberInputStream.java240 public int available() throws IOException { in available() method in LineNumberInputStream
241 return (pushBack == -1) ? super.available()/2 : super.available()/2 + 1; in available()
DFilterInputStream.java167 public int available() throws IOException { in available() method in FilterInputStream
168 return in.available(); in available()
/libcore/support/src/test/java/tests/support/
DSupport_ASimpleReader.java60 int available = len - pos; in read() local
61 if (available > 0) { in read()
62 int readable = (available < count ? available : count); in read()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DBufferedOutputStreamTest.java135 assertEquals("Bytes written, not buffered", 0, bais.available()); in test_write$BII()
138 assertEquals("Bytes not written after flush", 500, bais.available()); in test_write$BII()
142 bais.available() >= 1000); in test_write$BII()
653 assertEquals("Byte written, not buffered", 0, bais.available()); in test_writeI()
656 assertEquals("Byte not written after flush", 1, bais.available()); in test_writeI()
690 assertEquals("Bytes written, not buffered", 10, byteArrayis.available()); in test_write_Scenario1()
694 .available()); in test_write_Scenario1()
701 assertEquals("Bytes written, not buffered", 20, byteArrayis.available()); in test_write_Scenario1()
705 .available()); in test_write_Scenario1()
715 assertEquals("Bytes written, not buffered", 30, byteArrayis.available()); in test_write_Scenario1()
[all …]
DPipedInputStreamTest.java74 pis.available(); in test_ConstructorLjava_io_PipedOutputStream()
115 + pis.available(), pis.available() == 1000); in test_available()
125 assertEquals("Incorrect available count", 1024, pin.available()); in test_available()
156 pis.available()); in test_connectLjava_io_PipedOutputStream()
166 .available()); in test_connectLjava_io_PipedOutputStream()
184 .available()); in test_read()
205 + pis.available(), pis.available() == 1000); in test_read$BII()
DBufferedInputStreamTest.java166 .available() == INPUT.length()); in test_available()
172 int available = bis.available(); in test_available() local
174 assertTrue(available != 0); in test_available()
177 bis.available(); in test_available()
411 if (toRead > available()) { in test_read$BII()
412 toRead = available(); in test_read$BII()
420 public int available() { in test_read$BII()
DFilterOutputStreamTest.java83 bis.available() == fileString.length()); in test_write$B()
100 bis.available() == fileString.length()); in test_write$BII()
116 assertEquals("Byte not written after flush", 1, bis.available()); in test_writeI()
DByteArrayInputStreamTest.java38 bis.available() == fileString.length()); in test_Constructor$B()
49 .available()); in test_Constructor$BII()
78 .available() == fileString.length()); in test_available()
/libcore/luni/src/test/java/libcore/java/util/zip/
DDeflaterInputStreamTest.java40 assertEquals(1, in.available()); in testReadByteByByte()
45 assertEquals(0, in.available()); in testReadByteByByte()
51 in.available(); in testReadByteByByte()
74 assertEquals(1, in.available()); in testReadWithBuffer()
80 assertEquals(0, in.available()); in testReadWithBuffer()
86 in.available(); in testReadWithBuffer()
DZipInputStreamTest.java120 assertEquals(1, zis.available()); in testAvailable()
122 assertEquals(1, zis.available()); in testAvailable()
127 assertEquals(0, zis.available()); in testAvailable()
132 assertEquals(0, zis.available()); in testAvailable()
137 assertEquals(0, zis.available()); in testAvailable()
141 assertEquals(0, zis.available()); in testAvailable()
/libcore/ojluni/src/main/java/java/util/concurrent/
DSemaphore.java185 int available = getState(); in nonfairTryAcquireShared() local
186 int remaining = available - acquires; in nonfairTryAcquireShared()
188 compareAndSetState(available, remaining)) in nonfairTryAcquireShared()
253 int available = getState(); in tryAcquireShared() local
254 int remaining = available - acquires; in tryAcquireShared()
256 compareAndSetState(available, remaining)) in tryAcquireShared()
DDelayQueue.java105 private final Condition available = lock.newCondition(); field in DelayQueue
149 available.signal(); in offer()
216 available.await(); in take()
223 available.await(); in take()
228 available.awaitNanos(delay); in take()
238 available.signal(); in take()
264 nanos = available.awaitNanos(nanos); in poll()
273 nanos = available.awaitNanos(nanos); in poll()
278 long timeLeft = available.awaitNanos(delay); in poll()
289 available.signal(); in poll()
/libcore/ojluni/src/main/java/sun/security/util/
DDerInputBuffer.java65 int len = available(); in toByteArray()
108 int max = this.available(); in equals()
109 if (other.available() != max) in equals()
127 int len = available(); in hashCode()
136 if (len > available()) in truncate()
150 if (len > available()) in getBigInteger()
200 if (len > available()) in getBitString()
226 return getBitString(available()); in getBitString()
240 int len = available(); in getUnalignedBitString()
262 if (len > available()) in getUTCTime()
[all …]
DDerValue.java266 int readLen = inbuf.available(); in DerValue()
384 int readLen = in.available(); in init()
400 if (fullyBuffered && in.available() != length) in init()
502 while (in.available() != 0) { in getOctetString()
518 return buffer.getInteger(data.available()); in getInteger()
529 return buffer.getBigInteger(data.available(), false); in getBigInteger()
542 return buffer.getBigInteger(data.available(), true); in getPositiveBigInteger()
555 return buffer.getInteger(data.available()); in getEnumerated()
749 return buffer.getUTCTime(data.available()); in getUTCTime()
762 return buffer.getGeneralizedTime(data.available()); in getGeneralizedTime()
DDerInputStream.java431 int readLen = buffer.available(); in readVector()
456 if (buffer.available() == len) in readVector()
471 } while (newstr.available() > 0); in readVector()
473 if (newstr.available() != 0) in readVector()
686 public int available() { return buffer.available(); } in available() method in DerInputStream
/libcore/ojluni/src/main/java/java/util/
DCurrency.java83 private static HashSet<Currency> available; field in Currency
392 if (available == null) { in getAvailableCurrencies()
421 available = new HashSet<>(); in getAvailableCurrencies()
430 available.add(currency); in getAvailableCurrencies()
437 Set<Currency> result = (Set<Currency>) available.clone(); in getAvailableCurrencies()
/libcore/luni/src/test/java/libcore/java/io/
DOldBufferedOutputStreamTest.java93 0, bais.available()); in test_write$BII()
97 500, bais.available()); in test_write$BII()
101 bais.available() >= 1000); in test_write$BII()
161 0, bais.available()); in test_writeI()
165 1, bais.available()); in test_writeI()
DOldPushbackInputStreamTest.java92 assertEquals("Wrong number!", 30, tobj.available()); in test_available()
95 tobj.available(); in test_available()
172 assertEquals("Wrong number!", 30 - 6, tobj.available()); in test_skipJ()
209 assertEquals("Wrong number!", 30 + 10, tobj.available()); in test_unread$B()
249 assertEquals("Wrong number!", 30 + 10, tobj.available()); in test_unread$BII()
313 assertEquals("Wrong number!", 30, tobj.available()); in test_unreadI()
DFilterInputStreamNullSourceTest.java56 assertEquals(0, in.available()); in testCipherInputStream()
113 in.available(); in assertReadsFailWithIoException()
129 in.available(); in assertReadsFailWithNullPointerException()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
DChannelsTest.java106 assertEquals(file.available(), compareNumber); in assertFileSizeSame()
160 assertTrue(fins.available() > 0); in testNewChannelInputStream()
164 assertTrue(fins.available() > 0); in testNewChannelInputStream()
179 assertEquals(1, ins.available()); in testNewChannelInputStream()
243 assertEquals(this.fins.available(), 1); in testNewChannelOutputStream()
275 assertEquals(this.fileSize, this.fins.available()); in testNewInputStreamReadableByteChannel_InputNull()
292 assertEquals(this.fileSize, this.fins.available()); in testNewInputStreamReadableByteChannel()
297 assertEquals(this.fins.available(), this.fileSize - this.testNum); in testNewInputStreamReadableByteChannel()
300 assertEquals(this.fins.available(), this.fileSize - this.testNum * 2); in testNewInputStreamReadableByteChannel()
302 assertEquals(this.fins.available(), this.fileSize - this.testNum * 3); in testNewInputStreamReadableByteChannel()
[all …]

1234567