- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for Java8Compatibility (0.37 sec)
-
android/guava/src/com/google/common/hash/Java8Compatibility.java
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 21 03:10:51 UTC 2024 - 1.2K bytes - Viewed (0) -
guava/src/com/google/common/base/Java8Compatibility.java
*/ @J2ktIncompatible @GwtIncompatible final class Java8Compatibility { static void clear(Buffer b) { b.clear(); } static void flip(Buffer b) { b.flip(); } static void limit(Buffer b, int limit) { b.limit(limit); } static void position(Buffer b, int position) { b.position(position); } private Java8Compatibility() {}
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 21 03:10:51 UTC 2024 - 1.2K bytes - Viewed (0) -
android/guava/src/com/google/common/io/Java8Compatibility.java
/** * Wrappers around {@link Buffer} methods that are covariantly overridden in Java 9+. See * https://github.com/google/guava/issues/3990 */ @J2ktIncompatible @GwtIncompatible final class Java8Compatibility { static void clear(Buffer b) { b.clear(); } static void flip(Buffer b) { b.flip(); } static void limit(Buffer b, int limit) { b.limit(limit); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 21 03:10:51 UTC 2024 - 1.3K bytes - Viewed (0) -
guava/src/com/google/common/hash/AbstractStreamingHasher.java
*/ protected void processRemaining(ByteBuffer bb) { Java8Compatibility.position(bb, bb.limit()); // move at the end Java8Compatibility.limit(bb, chunkSize + 7); // get ready to pad with longs while (bb.position() < chunkSize) { bb.putLong(0); } Java8Compatibility.limit(bb, chunkSize); Java8Compatibility.flip(bb); process(bb); } @Override @CanIgnoreReturnValue
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 21 03:10:51 UTC 2024 - 7.1K bytes - Viewed (0) -
guava/src/com/google/common/hash/AbstractByteHasher.java
} /** Updates this hasher with bytes from the given buffer. */ protected void update(ByteBuffer b) { if (b.hasArray()) { update(b.array(), b.arrayOffset() + b.position(), b.remaining()); Java8Compatibility.position(b, b.limit()); } else { for (int remaining = b.remaining(); remaining > 0; remaining--) { update(b.get()); } } }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 12:40:17 UTC 2025 - 3.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/CharSequenceReaderTest.java
Java8Compatibility.flip(buf2); assertEquals(expected, buf2.toString()); assertFullyRead(reader); // read in chunks to fixed CharBuffer reader = new CharSequenceReader(charSequence); buf2 = CharBuffer.allocate(5); builder = new StringBuilder(); while (reader.read(buf2) != -1) { Java8Compatibility.flip(buf2); builder.append(buf2);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 6.6K bytes - Viewed (0) -
guava/src/com/google/common/io/CharStreams.java
} checkNotNull(from); checkNotNull(to); long total = 0; CharBuffer buf = createBuffer(); while (from.read(buf) != -1) { Java8Compatibility.flip(buf); to.append(buf); total += buf.remaining(); Java8Compatibility.clear(buf); } return total; } // TODO(lukes): consider allowing callers to pass in a buffer to use, some callers would be able
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 30 17:25:01 UTC 2025 - 10.9K bytes - Viewed (0) -
android/guava/src/com/google/common/hash/AbstractHasher.java
return this; } @Override @CanIgnoreReturnValue public Hasher putBytes(ByteBuffer b) { if (b.hasArray()) { putBytes(b.array(), b.arrayOffset() + b.position(), b.remaining()); Java8Compatibility.position(b, b.limit()); } else { for (int remaining = b.remaining(); remaining > 0; remaining--) { putByte(b.get()); } } return this; } @Override
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 3.5K bytes - Viewed (0) -
android/guava/src/com/google/common/io/LineReader.java
* @throws IOException if an I/O error occurs */ @CanIgnoreReturnValue // to skip a line public @Nullable String readLine() throws IOException { while (lines.peek() == null) { Java8Compatibility.clear(cbuf); // The default implementation of Reader#read(CharBuffer) allocates a // temporary char[], so we call Reader#read(char[], int, int) instead.
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 3K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/SourceSinkFactories.java
StringBuilder builder = new StringBuilder(); CharBuffer buffer = CharBuffer.allocate(100); while (reader.read(buffer) != -1) { Java8Compatibility.flip(buffer); builder.append(buffer); Java8Compatibility.clear(buffer); } return builder.toString(); } } private static class UrlByteSourceFactory extends FileByteSourceFactory {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 17.9K bytes - Viewed (0)