Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 159 for Bytes (0.25 sec)

  1. android/guava/src/com/google/common/primitives/Bytes.java

    /**
     * Static utility methods pertaining to {@code byte} primitives, that are not already found in
     * either {@link Byte} or {@link Arrays}, <i>and interpret bytes as neither signed nor unsigned</i>.
     * The methods which specifically treat bytes as signed or unsigned are found in {@link SignedBytes}
     * and {@link UnsignedBytes}.
     *
     * <p>See the Guava User Guide article on <a
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/SourceSinkFactories.java

        }
    
        @Override
        public byte[] getExpected(byte[] bytes) {
          if (initialBytes == null) {
            return checkNotNull(bytes);
          } else {
            byte[] result = new byte[initialBytes.length + bytes.length];
            System.arraycopy(initialBytes, 0, result, 0, initialBytes.length);
            System.arraycopy(bytes, 0, result, initialBytes.length, bytes.length);
            return result;
          }
        }
    
    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)
  3. android/guava/src/com/google/common/hash/PrimitiveSink.java

      /**
       * Puts an array of bytes into this sink.
       *
       * @param bytes a byte array
       * @return this instance
       */
      @CanIgnoreReturnValue
      PrimitiveSink putBytes(byte[] bytes);
    
      /**
       * Puts a chunk of an array of bytes into this sink. {@code bytes[off]} is the first byte written,
       * {@code bytes[off + len - 1]} is the last.
       *
       * @param bytes a byte array
    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)
  4. guava-tests/test/com/google/common/hash/HashTestUtils.java

        Random rng = new Random(0L);
        byte[] bytes = new byte[rng.nextInt(256) + 1];
        rng.nextBytes(bytes);
        assertEquals(hashFunction.hashBytes(bytes), hashFunction.hashBytes(ByteBuffer.wrap(bytes)));
      }
    
      static void assertHashByteBufferExhaustsBuffer(HashFunction hashFunction) {
        Random rng = new Random(0L);
        byte[] bytes = new byte[rng.nextInt(256) + 1];
        rng.nextBytes(bytes);
    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)
  5. android/guava/src/com/google/common/io/ByteArrayDataInput.java

      @CanIgnoreReturnValue // to skip some bytes
      @Override
      short readShort();
    
      @CanIgnoreReturnValue // to skip some bytes
      @Override
      int readUnsignedShort();
    
      @CanIgnoreReturnValue // to skip some bytes
      @Override
      char readChar();
    
      @CanIgnoreReturnValue // to skip some bytes
      @Override
      int readInt();
    
      @CanIgnoreReturnValue // to skip some bytes
      @Override
      long readLong();
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/TestByteSource.java

    public final class TestByteSource extends ByteSource implements TestStreamSupplier {
    
      private final byte[] bytes;
      private final ImmutableSet<TestOption> options;
    
      private boolean inputStreamOpened;
      private boolean inputStreamClosed;
    
      TestByteSource(byte[] bytes, TestOption... options) {
        this.bytes = checkNotNull(bytes);
        this.options = ImmutableSet.copyOf(options);
      }
    
      @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Apr 21 02:27:51 GMT 2017
    - 1.9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/primitives/Longs.java

       *
       * @throws IllegalArgumentException if {@code bytes} has fewer than 8 elements
       */
      public static long fromByteArray(byte[] bytes) {
        checkArgument(bytes.length >= BYTES, "array too small: %s < %s", bytes.length, BYTES);
        return fromBytes(
            bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], bytes[5], bytes[6], bytes[7]);
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 28.7K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/CountingOutputStream.java

    /**
     * An OutputStream that counts the number of bytes written.
     *
     * @author Chris Nokleberg
     * @since 1.0
     */
    @J2ktIncompatible
    @GwtIncompatible
    @ElementTypesAreNonnullByDefault
    public final class CountingOutputStream extends FilterOutputStream {
    
      private long count;
    
      /**
       * Wraps another output stream, counting the number of bytes written.
       *
       * @param out the output stream to be wrapped
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 2K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/ReserializingTestCollectionGenerator.java

      }
    
      @SuppressWarnings("unchecked")
      static <T> T reserialize(T object) {
        try {
          ByteArrayOutputStream bytes = new ByteArrayOutputStream();
          ObjectOutputStream out = new ObjectOutputStream(bytes);
          out.writeObject(object);
          ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()));
          return (T) in.readObject();
        } catch (IOException | ClassNotFoundException e) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 01 17:18:04 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/primitives/Shorts.java

       * @throws IllegalArgumentException if {@code bytes} has fewer than 2 elements
       */
      @GwtIncompatible // doesn't work
      public static short fromByteArray(byte[] bytes) {
        checkArgument(bytes.length >= BYTES, "array too small: %s < %s", bytes.length, BYTES);
        return fromBytes(bytes[0], bytes[1]);
      }
    
      /**
       * Returns the {@code short} value whose byte representation is the given 2 bytes, in big-endian
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 25.1K bytes
    - Viewed (0)
Back to top