Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for CharStreams (0.29 sec)

  1. android/guava/src/com/google/common/io/CharStreams.java

    @J2ktIncompatible
    @GwtIncompatible
    @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() {}
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/MultiReaderTest.java

        String expected = begin + end;
        assertEquals(expected.charAt(0), joinedReader.read());
        CharStreams.skipFully(joinedReader, 1);
        assertEquals(expected.charAt(2), joinedReader.read());
        CharStreams.skipFully(joinedReader, 4);
        assertEquals(expected.charAt(7), joinedReader.read());
        CharStreams.skipFully(joinedReader, 1);
        assertEquals(expected.charAt(9), joinedReader.read());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.7K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/CharStreamsTest.java

        Reader empty = new StringReader("");
        assertEquals(0, CharStreams.exhaust(empty));
        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));
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.2K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/io/CharStreamsTest.java

        Reader empty = new StringReader("");
        assertEquals(0, CharStreams.exhaust(empty));
        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));
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/MultiReaderTest.java

        String expected = begin + end;
        assertEquals(expected.charAt(0), joinedReader.read());
        CharStreams.skipFully(joinedReader, 1);
        assertEquals(expected.charAt(2), joinedReader.read());
        CharStreams.skipFully(joinedReader, 4);
        assertEquals(expected.charAt(7), joinedReader.read());
        CharStreams.skipFully(joinedReader, 1);
        assertEquals(expected.charAt(9), joinedReader.read());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.7K bytes
    - Viewed (0)
  6. build-logic/documentation/src/main/groovy/gradlebuild/docs/ReleaseNotesTransformer.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package gradlebuild.docs;
    
    import com.google.common.io.CharStreams;
    import org.gradle.api.GradleException;
    import org.gradle.api.UncheckedIOException;
    import org.jsoup.Jsoup;
    import org.jsoup.nodes.Document;
    import org.jsoup.nodes.DocumentType;
    import org.jsoup.nodes.Element;
    Java
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Thu Apr 25 04:49:56 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  7. guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java

    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
     * Reader implementations, this compares the performance of the different options.
     */
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 23 18:59:54 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java

    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
     * Reader implementations, this compares the performance of the different options.
     */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 23 18:59:54 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/CharSource.java

      public long copyTo(Appendable appendable) throws IOException {
        checkNotNull(appendable);
    
        Closer closer = Closer.create();
        try {
          Reader reader = closer.register(openStream());
          return CharStreams.copy(reader, appendable);
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      /**
       * Copies the contents of this source to the given sink.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 22.4K bytes
    - Viewed (0)
  10. guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java

            return new String(byteSource.read(), cs);
          }
        },
        USING_CHARSTREAMS_COPY {
          @Override
          String read(ByteSource byteSource, Charset cs) throws IOException {
            StringBuilder sb = new StringBuilder();
            try (InputStreamReader reader = new InputStreamReader(byteSource.openStream(), cs)) {
              CharStreams.copy(reader, sb);
            }
            return sb.toString();
          }
        },
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 5.2K bytes
    - Viewed (0)
Back to top