- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for markSupported (0.24 sec)
-
android/guava-tests/test/com/google/common/io/CountingInputStreamTest.java
assertEquals(20, counter.getCount()); } @SuppressWarnings("CheckReturnValue") // calling read() to skip a byte public void testMark() throws Exception { assertTrue(counter.markSupported()); assertEquals(10, counter.read(new byte[10])); assertEquals(10, counter.getCount()); counter.mark(5); counter.read(); assertEquals(11, counter.getCount()); counter.reset();
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 3.5K bytes - Viewed (0) -
android/guava/src/com/google/common/io/CountingInputStream.java
in.mark(readlimit); mark = count; // it's okay to mark even if mark isn't supported, as reset won't work } @Override public synchronized void reset() throws IOException { if (!in.markSupported()) { throw new IOException("Mark not supported"); } if (mark == -1) { throw new IOException("Mark not set"); } in.reset(); count = mark; }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed May 17 14:35:11 GMT 2023 - 2.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/CountingInputStreamTest.java
assertEquals(20, counter.getCount()); } @SuppressWarnings("CheckReturnValue") // calling read() to skip a byte public void testMark() throws Exception { assertTrue(counter.markSupported()); assertEquals(10, counter.read(new byte[10])); assertEquals(10, counter.getCount()); counter.mark(5); counter.read(); assertEquals(11, counter.getCount()); counter.reset();
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 3.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/MultiInputStreamTest.java
ByteSource source = newByteSource(0, 10); ByteSource joined = ByteSource.concat(source, source); assertEquals(20, joined.size()); InputStream in = joined.openStream(); assertFalse(in.markSupported()); assertEquals(10, in.available()); int total = 0; while (in.read() != -1) { total++; } assertEquals(0, in.available()); assertEquals(20, total); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 4.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/MultiInputStreamTest.java
ByteSource source = newByteSource(0, 10); ByteSource joined = ByteSource.concat(source, source); assertEquals(20, joined.size()); InputStream in = joined.openStream(); assertFalse(in.markSupported()); assertEquals(10, in.available()); int total = 0; while (in.read() != -1) { total++; } assertEquals(0, in.available()); assertEquals(20, total); }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 4.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CharSequenceReaderTest.java
} public void testMarkAndReset() throws IOException { String string = "abcdefghijklmnopqrstuvwxyz"; CharSequenceReader reader = new CharSequenceReader(string); assertTrue(reader.markSupported()); assertEquals(string, readFully(reader)); assertFullyRead(reader); // reset and read again reader.reset(); assertEquals(string, readFully(reader)); assertFullyRead(reader);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 6.5K bytes - Viewed (0) -
android/guava/src/com/google/common/io/MultiInputStream.java
} } @Override public int available() throws IOException { if (in == null) { return 0; } return in.available(); } @Override public boolean markSupported() { return false; } @Override public int read() throws IOException { while (in != null) { int result = in.read(); if (result != -1) { return result; }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Feb 28 20:13:02 GMT 2023 - 2.8K bytes - Viewed (0) -
android/guava/src/com/google/common/hash/HashingInputStream.java
} return numOfBytesRead; } /** * mark() is not supported for HashingInputStream * * @return {@code false} always */ @Override public boolean markSupported() { return false; } /** mark() is not supported for HashingInputStream */ @Override public void mark(int readlimit) {} /** * reset() is not supported for HashingInputStream. *
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Apr 20 18:43:59 GMT 2021 - 3K bytes - Viewed (0) -
android/guava/src/com/google/common/io/CharSequenceReader.java
return charsToSkip; } @Override public synchronized boolean ready() throws IOException { checkOpen(); return true; } @Override public boolean markSupported() { return true; } @Override public synchronized void mark(int readAheadLimit) throws IOException { checkArgument(readAheadLimit >= 0, "readAheadLimit (%s) may not be negative", readAheadLimit);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Feb 28 20:13:02 GMT 2023 - 4.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/CharSequenceReaderTest.java
} public void testMarkAndReset() throws IOException { String string = "abcdefghijklmnopqrstuvwxyz"; CharSequenceReader reader = new CharSequenceReader(string); assertTrue(reader.markSupported()); assertEquals(string, readFully(reader)); assertFullyRead(reader); // reset and read again reader.reset(); assertEquals(string, readFully(reader)); assertFullyRead(reader);
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 6.5K bytes - Viewed (0)