Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 52 for Header (0.15 sec)

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

        // The most common case is that from is a Reader (like InputStreamReader or StringReader) so
        // take advantage of that.
        if (from instanceof Reader) {
          // optimize for common output types which are optimized to deal with char[]
          if (to instanceof StringBuilder) {
            return copyReaderToBuilder((Reader) from, (StringBuilder) to);
          } else {
            return copyReaderToWriter((Reader) from, asWriter(to));
          }
        }
    
    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/src/com/google/common/collect/MapMakerInternalMap.java

           * about one-sixth of them need cloning when a table doubles. The nodes they replace will be
           * garbage collectable as soon as they are no longer referenced by any reader thread that may
           * be in the midst of traversing table right now.
           */
    
          int newCount = count;
          AtomicReferenceArray<E> newTable = newEntryArray(oldCapacity << 1);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 91.9K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/testing/NullPointerTester.java

      static boolean isNullable(Invokable<?, ?> invokable) {
        return NULLNESS_ANNOTATION_READER.isNullable(invokable);
      }
    
      static boolean isNullable(Parameter param) {
        return NULLNESS_ANNOTATION_READER.isNullable(param);
      }
    
      private static boolean containsNullable(Annotation[] annotations) {
        for (Annotation annotation : annotations) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 16 15:12:31 GMT 2023
    - 23.3K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/Files.java

     * @author Colin Decker
     * @since 1.0
     */
    @J2ktIncompatible
    @GwtIncompatible
    @ElementTypesAreNonnullByDefault
    public final class Files {
    
      private Files() {}
    
      /**
       * Returns a buffered reader that reads from a file using the given character set.
       *
       * <p><b>{@link java.nio.file.Path} equivalent:</b> {@link
       * java.nio.file.Files#newBufferedReader(java.nio.file.Path, Charset)}.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/CharSourceTester.java

      }
    
      public void testOpenStream() throws IOException {
        Reader reader = source.openStream();
    
        StringWriter writer = new StringWriter();
        char[] buf = new char[64];
        int read;
        while ((read = reader.read(buf)) != -1) {
          writer.write(buf, 0, read);
        }
        reader.close();
        writer.close();
    
        assertExpectedString(writer.toString());
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 7.3K bytes
    - Viewed (0)
  6. guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java

          @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();
          }
        },
        // It really seems like this should be faster than TO_BYTE_ARRAY_NEW_STRING.  But it just isn't
    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)
  7. android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java

          @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();
          }
        },
        // It really seems like this should be faster than TO_BYTE_ARRAY_NEW_STRING.  But it just isn't
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 5.2K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/io/CharSinkTest.java

        sink.write(STRING);
    
        assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed());
        assertEquals(STRING, sink.getString());
      }
    
      public void testWriteFrom_reader() throws IOException {
        StringReader reader = new StringReader(STRING);
        sink.writeFrom(reader);
    
        assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed());
        assertEquals(STRING, sink.getString());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java

    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.
     */
    // These benchmarks allocate a lot of data so use a large heap
    @VmOptions({"-Xms12g", "-Xmx12g", "-d64"})
    public class CharStreamsCopyBenchmark {
    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)
  10. android/guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java

    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.
     */
    // These benchmarks allocate a lot of data so use a large heap
    @VmOptions({"-Xms12g", "-Xmx12g", "-d64"})
    public class CharStreamsCopyBenchmark {
    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)
Back to top