- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 290 for Read (0.15 sec)
-
android/guava-tests/test/com/google/common/io/CharSequenceReaderTest.java
assertEquals(-1, reader.read()); assertEquals(-1, reader.read(new char[10], 0, 10)); assertEquals(-1, reader.read(CharBuffer.allocate(10))); assertEquals(0, reader.skip(10)); } private static String readFully(CharSequenceReader reader) throws IOException { StringBuilder builder = new StringBuilder(); int read; while ((read = reader.read()) != -1) { builder.append((char) read);
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 6.5K bytes - Viewed (0) -
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 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/io/FileBackedOutputStreamTest.java
ByteSource source = out.asByteSource(); out.write(data); assertTrue(Arrays.equals(data, source.read())); out.reset(); assertTrue(Arrays.equals(new byte[0], source.read())); out.write(data); assertTrue(Arrays.equals(data, source.read())); out.close(); } private static boolean isAndroid() {
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 5.5K 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/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) -
maven-core/src/main/java/org/apache/maven/internal/impl/DefaultPluginXmlFactory.java
Java - Registered: Sun Apr 28 03:35:10 GMT 2024 - Last Modified: Mon Mar 25 10:50:01 GMT 2024 - 5K 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) -
api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/XmlFactory.java
/** * Generic interface to read/write objects to/from XML. * * @param <T> the object type to read/write * @since 4.0.0 */ @Experimental public interface XmlFactory<T> extends Service { @Nonnull default T read(@Nonnull Path path) throws XmlReaderException { return read(path, true); } @Nonnull default T read(@Nonnull Path path, boolean strict) throws XmlReaderException {
Java - Registered: Sun Apr 28 03:35:10 GMT 2024 - Last Modified: Fri Nov 17 15:52:15 GMT 2023 - 3.9K bytes - Viewed (0)