- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 17 for CharBuffer (0.06 seconds)
-
guava/src/com/google/common/io/CharStreams.java
@J2ktIncompatible @GwtIncompatible public final class CharStreams { // 2K chars (4K bytes) private static final int DEFAULT_BUF_SIZE = 0x800; /** Creates a new {@code CharBuffer} for buffering reads or writes. */ static CharBuffer createBuffer() { return CharBuffer.allocate(DEFAULT_BUF_SIZE); } private CharStreams() {} /** * Copies all characters between the {@link Readable} and {@link Appendable} objects. Does notCreated: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Sep 29 13:56:24 GMT 2025 - 11.9K bytes - Click Count (0) -
guava-tests/test/com/google/common/io/CharSequenceReaderTest.java
builder.append(buf, 0, read); } assertEquals(expected, builder.toString()); assertFullyRead(reader); // read all to one CharBuffer reader = new CharSequenceReader(charSequence); CharBuffer buf2 = CharBuffer.allocate(expected.length()); assertEquals(expected.length() == 0 ? -1 : expected.length(), reader.read(buf2)); Java8Compatibility.flip(buf2);
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Dec 19 18:03:30 GMT 2024 - 6.6K bytes - Click Count (0) -
android/guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java
import com.google.caliper.Param; import com.google.caliper.api.VmOptions; import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; import java.nio.Buffer; import java.nio.CharBuffer; import java.util.Random; import org.jspecify.annotations.NullUnmarked; /** * Benchmarks for {@link CharStreams#copy}. *Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue May 13 18:46:00 GMT 2025 - 3.2K bytes - Click Count (0) -
android/guava/src/com/google/common/io/LineReader.java
import com.google.common.annotations.J2ktIncompatible; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.IOException; import java.io.Reader; import java.nio.CharBuffer; import java.util.ArrayDeque; import java.util.Queue; import org.jspecify.annotations.Nullable; /** * A class for reading lines of text. Provides the same functionality as {@linkCreated: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Sun Dec 22 03:38:46 GMT 2024 - 3K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/io/CharStreamsTest.java
assertEquals(-1, empty.read()); } public void testExhaust_readable() throws IOException { CharBuffer buf = CharBuffer.wrap(ASCII); assertEquals(ASCII.length(), CharStreams.exhaust(buf)); assertEquals(0, buf.remaining()); assertEquals(0, CharStreams.exhaust(buf)); CharBuffer empty = CharBuffer.wrap(""); assertEquals(0, CharStreams.exhaust(empty)); assertEquals(0, empty.remaining()); }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Oct 28 16:03:47 GMT 2025 - 11.3K bytes - Click Count (0) -
guava-tests/test/com/google/common/io/CharStreamsTest.java
assertEquals(-1, empty.read()); } public void testExhaust_readable() throws IOException { CharBuffer buf = CharBuffer.wrap(ASCII); assertEquals(ASCII.length(), CharStreams.exhaust(buf)); assertEquals(0, buf.remaining()); assertEquals(0, CharStreams.exhaust(buf)); CharBuffer empty = CharBuffer.wrap(""); assertEquals(0, CharStreams.exhaust(empty)); assertEquals(0, empty.remaining()); }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Oct 28 16:03:47 GMT 2025 - 11.3K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/base/ToStringHelperTest.java
} @J2ktIncompatible // J2kt CharBuffer does not implement CharSequence so not recognized as empty @GwtIncompatible // CharBuffer not available public void testToStringOmitEmptyValues_charBuffer() { String toTest = MoreObjects.toStringHelper(new TestClass()) .omitEmptyValues() .add("field1", "Hello") .add("field2", CharBuffer.allocate(0)) .toString();
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue May 13 18:46:00 GMT 2025 - 21.4K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/io/LineBufferTest.java
import com.google.common.collect.Lists; import java.io.BufferedReader; import java.io.FilterReader; import java.io.IOException; import java.io.Reader; import java.io.StringReader; import java.nio.CharBuffer; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.jspecify.annotations.NullUnmarked; /** * Unit tests for {@link LineBuffer} and {@link LineReader}. *Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue May 13 18:46:00 GMT 2025 - 4.9K bytes - Click Count (0) -
guava-tests/test/com/google/common/io/LineBufferTest.java
import com.google.common.collect.Lists; import java.io.BufferedReader; import java.io.FilterReader; import java.io.IOException; import java.io.Reader; import java.io.StringReader; import java.nio.CharBuffer; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.jspecify.annotations.NullUnmarked; /** * Unit tests for {@link LineBuffer} and {@link LineReader}. *Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue May 13 18:46:00 GMT 2025 - 4.9K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java
.put(Reader.class, new StringReader("")) .put(StringReader.class, new StringReader("")) .put(Buffer.class, ByteBuffer.allocate(0)) .put(CharBuffer.class, CharBuffer.allocate(0)) .put(ByteBuffer.class, ByteBuffer.allocate(0)) .put(ShortBuffer.class, ShortBuffer.allocate(0)) .put(IntBuffer.class, IntBuffer.allocate(0))
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Sep 23 17:50:58 GMT 2025 - 20.9K bytes - Click Count (0)