Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 106 for buffer (0.33 sec)

  1. android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java

              char[] buffer = new char[maxChars];
              int bufIndex = 0;
              int remaining = buffer.length;
              try (InputStreamReader reader = new InputStreamReader(byteSource.openStream(), cs)) {
                int nRead = 0;
                while (remaining > 0 && (nRead = reader.read(buffer, bufIndex, remaining)) != -1) {
                  bufIndex += nRead;
    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)
  2. guava/src/com/google/common/base/Utf8.java

       * {@link #isWellFormed(byte[])}. Note that this can be false even when {@code
       * isWellFormed(bytes)} is true.
       *
       * @param bytes the input buffer
       * @param off the offset in the buffer of the first byte to read
       * @param len the number of bytes to read from the buffer
       */
      public static boolean isWellFormed(byte[] bytes, int off, int len) {
        int end = off + len;
        checkPositionIndexes(off, end, bytes.length);
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 10 14:11:51 GMT 2023
    - 7K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/math/Stats.java

            "Expected at least Stats.BYTES = %s remaining , got %s",
            BYTES,
            buffer.remaining());
        return new Stats(
            buffer.getLong(),
            buffer.getDouble(),
            buffer.getDouble(),
            buffer.getDouble(),
            buffer.getDouble());
      }
    
      private static final long serialVersionUID = 0;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 22K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/CharStreams.java

          to.append(buf);
          total += buf.remaining();
          Java8Compatibility.clear(buf);
        }
        return total;
      }
    
      // TODO(lukes): consider allowing callers to pass in a buffer to use, some callers would be able
      // to reuse buffers, others would be able to size them more appropriately than the constant
      // defaults
    
      /**
       * Copies all characters between the {@link Reader} and {@link StringBuilder} objects. Does not
    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)
  5. android/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    import java.lang.reflect.Type;
    import java.lang.reflect.TypeVariable;
    import java.math.BigDecimal;
    import java.math.BigInteger;
    import java.nio.Buffer;
    import java.nio.ByteBuffer;
    import java.nio.CharBuffer;
    import java.nio.DoubleBuffer;
    import java.nio.FloatBuffer;
    import java.nio.IntBuffer;
    import java.nio.LongBuffer;
    import java.nio.ShortBuffer;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 28K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/hash/HashTestUtils.java

            for (PrimitiveSink sink : sinks) {
              ByteBuffer buffer = ByteBuffer.wrap(value);
              Java8Compatibility.position(buffer, pos);
              Java8Compatibility.limit(buffer, limit);
              sink.putBytes(buffer);
              assertEquals(limit, buffer.limit());
              assertEquals(limit, buffer.position());
            }
          }
        },
        PUT_STRING() {
          @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 25.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/escape/UnicodeEscaper.java

     *
     * @author David Beaumont
     * @since 15.0
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public abstract class UnicodeEscaper extends Escaper {
      /** The amount of padding (chars) to use when growing the escape buffer. */
      private static final int DEST_PAD = 32;
    
      /** Constructor for use by subclasses. */
      protected UnicodeEscaper() {}
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 13.2K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/hash/HashingTest.java

        byte[] murmur3Hash = Hashing.murmur3_32().hashLong(42L).asBytes();
        byte[] combined = new byte[md5Hash.length + murmur3Hash.length];
        ByteBuffer buffer = ByteBuffer.wrap(combined);
        buffer.put(md5Hash);
        buffer.put(murmur3Hash);
        HashCode expected = HashCode.fromBytes(combined);
    
        assertEquals(
            expected, Hashing.concatenating(Hashing.md5(), Hashing.murmur3_32()).hashLong(42L));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 26.5K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/io/CharStreamsCopyBenchmark.java

            CharBuffer buf = CharStreams.createBuffer();
            long total = 0;
            while (from.read(buf) != -1) {
              ((Buffer) buf).flip();
              to.append(buf);
              total += buf.remaining();
              ((Buffer) buf).clear();
            }
            return total;
          }
        },
        NEW {
          @Override
          long copy(Readable from, Appendable to) throws IOException {
    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

            CharBuffer buf = CharStreams.createBuffer();
            long total = 0;
            while (from.read(buf) != -1) {
              ((Buffer) buf).flip();
              to.append(buf);
              total += buf.remaining();
              ((Buffer) buf).clear();
            }
            return total;
          }
        },
        NEW {
          @Override
          long copy(Readable from, Appendable to) throws IOException {
    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