- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 318 for Read (0.16 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/src/com/google/common/io/MultiReader.java
current = it.next().openStream(); } } @Override public int read(char[] cbuf, int off, int len) throws IOException { checkNotNull(cbuf); if (current == null) { return -1; } int result = current.read(cbuf, off, len); if (result == -1) { advance(); return read(cbuf, off, len); } return result; } @Override
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Feb 28 20:13:02 GMT 2023 - 2.4K bytes - Viewed (2) -
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 May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 21.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/StripedTest.java
.add(new Striped.SmallLazyStriped<ReadWriteLock>(50, READ_WRITE_LOCK_SUPPLIER)) .add(new Striped.SmallLazyStriped<ReadWriteLock>(64, READ_WRITE_LOCK_SUPPLIER)) .add(new Striped.LargeLazyStriped<ReadWriteLock>(50, READ_WRITE_LOCK_SUPPLIER)) .add(new Striped.LargeLazyStriped<ReadWriteLock>(64, READ_WRITE_LOCK_SUPPLIER)) .add(new Striped.SmallLazyStriped<Lock>(50, LOCK_SUPPLER))
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 09 22:57:07 GMT 2022 - 8.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/SourceSinkFactories.java
InputStream in = new FileInputStream(file); ByteArrayOutputStream out = new ByteArrayOutputStream(); byte[] buffer = new byte[100]; int read; while ((read = in.read(buffer)) != -1) { out.write(buffer, 0, read); } return out.toByteArray(); } } private static class FileCharSourceFactory extends FileFactory implements CharSourceFactory {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Sep 09 17:57:59 GMT 2021 - 17.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/LineBufferTest.java
@Override public int read(CharBuffer cbuf) throws IOException { return reader.read(cbuf); } }; } private static Reader getChunkedReader(String input, final int chunk) { return new FilterReader(new StringReader(input)) { @Override public int read(char[] cbuf, int off, int len) throws IOException { return super.read(cbuf, off, Math.min(chunk, len)); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 4.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/MultiReaderTest.java
assertEquals(expected.charAt(0), joinedReader.read()); CharStreams.skipFully(joinedReader, 1); assertEquals(expected.charAt(2), joinedReader.read()); CharStreams.skipFully(joinedReader, 4); assertEquals(expected.charAt(7), joinedReader.read()); CharStreams.skipFully(joinedReader, 1); assertEquals(expected.charAt(9), joinedReader.read()); assertEquals(-1, joinedReader.read()); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 3.7K 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 May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 16.9K bytes - Viewed (0) -
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 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 21.9K bytes - Viewed (1)