Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for createBuffer (0.04 sec)

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

    @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 not
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 30 17:25:01 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  2. guava/src/com/google/common/io/ByteStreams.java

      }
    
      /** Compares the contents of the two {@link InputStream}s for equality. */
      static boolean contentsEqual(InputStream in1, InputStream in2) throws IOException {
        byte[] buf1 = createBuffer();
        byte[] buf2 = createBuffer();
        while (true) {
          int read1 = read(in1, buf1, 0, BUFFER_SIZE);
          int read2 = read(in2, buf2, 0, BUFFER_SIZE);
          if (read1 != read2 || !arraysEqual(buf1, buf2, read1)) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 31.1K bytes
    - Viewed (0)
Back to top