- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 23 for CharBuffer (0.1 sec)
-
guava/src/com/google/common/io/CharStreams.java
@ElementTypesAreNonnullByDefault 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 not
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed May 17 14:35:11 UTC 2023 - 10.9K bytes - Viewed (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);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 6.5K bytes - Viewed (0) -
android/guava/src/com/google/common/io/ReaderInputStream.java
return 0; // Not called. } } } } /** Returns a new CharBuffer identical to buf, except twice the capacity. */ private static CharBuffer grow(CharBuffer buf) { char[] copy = Arrays.copyOf(buf.array(), buf.capacity() * 2); CharBuffer bigger = CharBuffer.wrap(copy); Java8Compatibility.position(bigger, buf.position()); Java8Compatibility.limit(bigger, buf.limit());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 9.3K bytes - Viewed (0) -
guava/src/com/google/common/io/ReaderInputStream.java
return 0; // Not called. } } } } /** Returns a new CharBuffer identical to buf, except twice the capacity. */ private static CharBuffer grow(CharBuffer buf) { char[] copy = Arrays.copyOf(buf.array(), buf.capacity() * 2); CharBuffer bigger = CharBuffer.wrap(copy); Java8Compatibility.position(bigger, buf.position()); Java8Compatibility.limit(bigger, buf.limit());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 9.3K bytes - Viewed (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 javax.annotation.CheckForNull; /** * A class for reading lines of text. Provides the same functionality as {@link
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed May 17 14:35:11 UTC 2023 - 3.1K bytes - Viewed (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; /** * Benchmarks for {@link CharStreams#copy}. * * <p>{@link CharStreams#copy} has type specific optimizations for various common Appendable and
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 23 18:59:54 UTC 2023 - 3.2K bytes - Viewed (0) -
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; /** * Benchmarks for {@link CharStreams#copy}. * * <p>{@link CharStreams#copy} has type specific optimizations for various common Appendable and
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 23 18:59:54 UTC 2023 - 3.2K bytes - Viewed (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()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 11.2K bytes - Viewed (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()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 11.2K bytes - Viewed (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();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 09 21:19:18 UTC 2024 - 21.3K bytes - Viewed (0)