Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 106 for buffer (0.14 sec)

  1. android/guava/src/com/google/common/collect/EvictingQueue.java

     * attempting to add new elements onto the queue and it is full. This queue orders elements FIFO
     * (first-in-first-out). This data structure is logically equivalent to a circular buffer (i.e.,
     * cyclic buffer or ring buffer).
     *
     * <p>An evicting queue must be configured with a maximum size. Each time an element is added to a
     * full queue, the queue automatically removes its head element. This is different from conventional
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri May 12 17:52:55 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/hash/HashingOutputStreamTest.java

        out.write(b);
    
        verify(hashFunction).newHasher();
        verify(hasher).putByte((byte) b);
        verifyNoMoreInteractions(hashFunction, hasher);
      }
    
      public void testWrite_putByteArray() throws Exception {
        byte[] buf = new byte[] {'y', 'a', 'm', 's'};
        HashingOutputStream out = new HashingOutputStream(hashFunction, buffer);
        out.write(buf);
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 3.1K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/base/JoinerBenchmark.java

            delim = DELIMITER_STRING;
          }
          dummy ^= sb.toString().length();
        }
        return dummy;
      }
    
      /**
       * Always append the delimiter after the component, and in the very end shortens the buffer to get
       * rid of the extra trailing delimiter.
       */
      @Benchmark
      int alwaysAppendThenBackUp(int reps) {
        int dummy = 0;
        for (int i = 0; i < reps; i++) {
          StringBuilder sb = new StringBuilder();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.9K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/QueuesTest.java

      private static <T> int drain(
          BlockingQueue<T> q,
          Collection<? super T> buffer,
          int maxElements,
          long timeout,
          TimeUnit unit,
          boolean interruptibly)
          throws InterruptedException {
        return interruptibly
            ? Queues.drain(q, buffer, maxElements, timeout, unit)
            : Queues.drainUninterruptibly(q, buffer, maxElements, timeout, unit);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/Queues.java

      public static <E> int drain(
          BlockingQueue<E> q,
          Collection<? super E> buffer,
          int numElements,
          long timeout,
          TimeUnit unit)
          throws InterruptedException {
        Preconditions.checkNotNull(buffer);
        /*
         * This code performs one System.nanoTime() more than necessary, and in return, the time to
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 16K bytes
    - Viewed (0)
  6. guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java

    import java.io.Writer;
    import java.lang.reflect.AnnotatedElement;
    import java.lang.reflect.GenericDeclaration;
    import java.lang.reflect.Type;
    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 Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.1K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/FilesTest.java

              private final ByteArrayOutputStream out = new ByteArrayOutputStream();
    
              @Override
              public boolean processBytes(byte[] buffer, int offset, int length) throws IOException {
                if (length >= 0) {
                  out.write(buffer, offset, length);
                }
                return true;
              }
    
              @Override
              public byte[] getResult() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.2K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/io/FilesTest.java

              private final ByteArrayOutputStream out = new ByteArrayOutputStream();
    
              @Override
              public boolean processBytes(byte[] buffer, int offset, int length) throws IOException {
                if (length >= 0) {
                  out.write(buffer, offset, length);
                }
                return true;
              }
    
              @Override
              public byte[] getResult() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.2K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/math/StatsTest.java

      }
    
      public void testFromByteArray_withTooLongArrayInputThrowsIllegalArgumentException() {
        byte[] buffer = MANY_VALUES_STATS_VARARGS.toByteArray();
        byte[] tooLongByteArray =
            ByteBuffer.allocate(buffer.length + 2)
                .order(ByteOrder.LITTLE_ENDIAN)
                .put(buffer)
                .putChar('.')
                .array();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.4K bytes
    - Viewed (0)
  10. 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 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