Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 145 for Buffer (0.22 sec)

  1. android/guava/src/com/google/common/hash/Murmur3_32HashFunction.java

        @CanIgnoreReturnValue
        @Override
        public Hasher putBytes(ByteBuffer buffer) {
          ByteOrder bo = buffer.order();
          buffer.order(ByteOrder.LITTLE_ENDIAN);
          while (buffer.remaining() >= 4) {
            putInt(buffer.getInt());
          }
          while (buffer.hasRemaining()) {
            putByte(buffer.get());
          }
          buffer.order(bo);
          return this;
        }
    
        @CanIgnoreReturnValue
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 11.9K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/hash/HashingInputStreamTest.java

      private static final byte[] testBytes = new byte[] {'y', 'a', 'm', 's'};
      private ByteArrayInputStream buffer;
    
      @SuppressWarnings("DoNotMock")
      @Override
      protected void setUp() throws Exception {
        super.setUp();
        hasher = mock(Hasher.class);
        hashFunction = mock(HashFunction.class);
        buffer = new ByteArrayInputStream(testBytes);
    
        when(hashFunction.newHasher()).thenReturn(hasher);
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/hash/Java8Compatibility.java

    import java.nio.Buffer;
    
    /**
     * Wrappers around {@link Buffer} methods that are covariantly overridden in Java 9+. See
     * https://github.com/google/guava/issues/3990
     */
    @GwtIncompatible
    @ElementTypesAreNonnullByDefault
    final class Java8Compatibility {
      static void clear(Buffer b) {
        b.clear();
      }
    
      static void flip(Buffer b) {
        b.flip();
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 1.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/hash/SipHashFunction.java

        }
    
        @Override
        protected void process(ByteBuffer buffer) {
          b += CHUNK_SIZE;
          processM(buffer.getLong());
        }
    
        @Override
        protected void processRemaining(ByteBuffer buffer) {
          b += buffer.remaining();
          for (int i = 0; buffer.hasRemaining(); i += 8) {
            finalM ^= (buffer.get() & 0xFFL) << i;
          }
        }
    
        @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 5.3K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/io/SourceSinkFactories.java

          StringBuilder builder = new StringBuilder();
          CharBuffer buffer = CharBuffer.allocate(100);
          while (reader.read(buffer) != -1) {
            Java8Compatibility.flip(buffer);
            builder.append(buffer);
            Java8Compatibility.clear(buffer);
          }
          return builder.toString();
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 12.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/escape/CharEscaper.java

        int slen = s.length();
    
        // Get a destination buffer and setup some loop variables.
        char[] dest = Platform.charBufferFromThreadLocal();
        int destSize = dest.length;
        int destIndex = 0;
        int lastEscape = 0;
    
        // Loop through the rest of the string, replacing when needed into the
        // destination buffer, which gets grown as needed as well.
        for (; index < slen; index++) {
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 6.7K bytes
    - Viewed (0)
  7. 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 Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 25.3K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/hash/PrimitiveSink.java

      PrimitiveSink putBytes(byte[] bytes, int off, int len);
    
      /**
       * Puts the remaining bytes of a byte buffer into this sink. {@code bytes.position()} is the first
       * byte written, {@code bytes.limit() - 1} is the last. The position of the buffer will be equal
       * to the limit when this method returns.
       *
       * @param bytes a byte buffer
       * @return this instance
       * @since 23.0
       */
      @CanIgnoreReturnValue
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 3.9K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/LineBuffer.java

       * the line and the line separator itself are passed to the abstract {@link #handleLine} method.
       *
       * @param cbuf the character buffer to process
       * @param off the offset into the buffer
       * @param len the number of characters to process
       * @throws IOException if an I/O error occurs
       * @see #finish
       */
      protected void add(char[] cbuf, int off, int len) throws IOException {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/io/Java8Compatibility.java

    import java.nio.Buffer;
    
    /**
     * Wrappers around {@link Buffer} methods that are covariantly overridden in Java 9+. See
     * https://github.com/google/guava/issues/3990
     */
    @J2ktIncompatible
    @GwtIncompatible
    @ElementTypesAreNonnullByDefault
    final class Java8Compatibility {
      static void clear(Buffer b) {
        b.clear();
      }
    
      static void flip(Buffer b) {
        b.flip();
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 1.4K bytes
    - Viewed (0)
Back to top