- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 343 for Read (0.15 sec)
-
guava-testlib/test/com/google/common/testing/FakeTickerTest.java
assertEquals(0, ticker.read()); assertEquals(10, ticker.read()); assertEquals(20, ticker.read()); } public void testAutoIncrementStep_millis() { FakeTicker ticker = new FakeTicker().setAutoIncrementStep(1, TimeUnit.MILLISECONDS); assertEquals(0, ticker.read()); assertEquals(1000000, ticker.read()); assertEquals(2000000, ticker.read()); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Tue Feb 06 14:40:46 GMT 2024 - 6.3K bytes - Viewed (0) -
android/guava/src/com/google/common/io/ByteStreams.java
int off = (int) expectedSize - remaining; int read = in.read(bytes, off, remaining); if (read == -1) { // end of stream before reading expectedSize bytes // just return the bytes read so far return Arrays.copyOf(bytes, off); } remaining -= read; } // bytes is now full int b = in.read(); if (b == -1) { return bytes; }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Jan 17 18:59:58 GMT 2024 - 29.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/ByteStreamsTest.java
assertEquals(2, lin.available()); int read = lin.read(); assertEquals(big[0], read); assertEquals(1, lin.available()); read = lin.read(); assertEquals(big[1], read); assertEquals(0, lin.available()); read = lin.read(); assertEquals(-1, read); lin.reset(); byte[] small = new byte[5]; read = lin.read(small); assertEquals(2, read); assertEquals(big[0], small[0]);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 21.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/ByteSourceTest.java
// The stream reports no bytes... importantly, it doesn't read the byte at index 5 when it // should be reading the byte at index 10. // We could use a custom InputStream instead to make the read start at index 10, but since this // is a racy situation anyway, this behavior seems reasonable. assertEquals(-1, in.read()); } private static class AppendableByteSource extends ByteSource {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 16.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/CharSourceTest.java
assertTrue(source.wasStreamOpened()); assertFalse(source.wasStreamClosed()); StringWriter writer = new StringWriter(); char[] buf = new char[64]; int read; while ((read = reader.read(buf)) != -1) { writer.write(buf, 0, read); } reader.close(); writer.close(); assertTrue(source.wasStreamClosed()); assertEquals(STRING, writer.toString()); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 13K bytes - Viewed (0) -
android/guava/src/com/google/common/io/ByteSource.java
* block indefinitely or fail if the source creates an infinite stream. * <li><b>Non-destructive:</b> A <i>destructive</i> stream will consume or otherwise alter the * bytes of the source as they are read from it. A source that provides such streams will not * be reusable, and operations that read from the stream (including {@link #size()}, in some
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed May 17 14:35:11 GMT 2023 - 26.2K bytes - Viewed (0) -
src/main/java/org/codelibs/core/text/Tokenizer.java
Java - Registered: Fri Apr 26 20:58:09 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 8.6K bytes - Viewed (0) -
maven-core/src/main/java/org/apache/maven/internal/impl/DefaultModelXmlFactory.java
if (inputStream != null) { return xml.read(inputStream, request.isStrict(), source); } else if (reader != null) { return xml.read(reader, request.isStrict(), source); } else if (path != null) { try (InputStream is = Files.newInputStream(path)) { return xml.read(is, request.isStrict(), source); } } else {
Java - Registered: Sun Mar 24 03:35:10 GMT 2024 - Last Modified: Thu Dec 07 20:05:02 GMT 2023 - 5.1K bytes - Viewed (0) -
maven-api-impl/src/main/java/org/apache/maven/internal/impl/DefaultModelXmlFactory.java
if (inputStream != null) { return xml.read(inputStream, request.isStrict(), source); } else if (reader != null) { return xml.read(reader, request.isStrict(), source); } else if (path != null) { try (InputStream is = Files.newInputStream(path)) { return xml.read(is, request.isStrict(), source); } } else {
Java - Registered: Sun Apr 28 03:35:10 GMT 2024 - Last Modified: Fri Apr 12 10:50:18 GMT 2024 - 5.4K bytes - Viewed (0) -
android/guava/src/com/google/common/io/CharSource.java
* block indefinitely or fail if the source creates an infinite reader. * <li><b>Non-destructive:</b> A <i>destructive</i> reader will consume or otherwise alter the * source as they are read from it. A source that provides such readers will not be reusable, * and operations that read from the stream (including {@link #length()}, in some
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed May 17 14:35:11 GMT 2023 - 22.4K bytes - Viewed (0)