Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 230 for Bytes (0.24 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/primitives/BytesTest.java

        assertThat(Bytes.indexOf(EMPTY, ARRAY234)).isEqualTo(-1);
        assertThat(Bytes.indexOf(ARRAY234, ARRAY1)).isEqualTo(-1);
        assertThat(Bytes.indexOf(ARRAY1, ARRAY234)).isEqualTo(-1);
        assertThat(Bytes.indexOf(ARRAY1, ARRAY1)).isEqualTo(0);
        assertThat(Bytes.indexOf(ARRAY234, ARRAY234)).isEqualTo(0);
        assertThat(Bytes.indexOf(ARRAY234, new byte[] {(byte) 2, (byte) 3})).isEqualTo(0);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/io/ByteStreams.java

          }
          remaining -= read;
        }
    
        // bytes is now full
        int b = in.read();
        if (b == -1) {
          return bytes;
        }
    
        // the stream was longer, so read the rest normally
        Queue<byte[]> bufs = new ArrayDeque<>(TO_BYTE_ARRAY_DEQUE_SIZE + 2);
        bufs.add(bytes);
        bufs.add(new byte[] {(byte) b});
        return toByteArrayInternal(in, bufs, bytes.length + 1);
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 17 18:59:58 GMT 2024
    - 29.7K bytes
    - Viewed (0)
  6. 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)
  7. android/guava-tests/test/com/google/common/io/ByteSourceTest.java

        assertTrue(source.wasStreamClosed());
        assertArrayEquals(bytes, out.toByteArray());
      }
    
      public void testSize() throws IOException {
        assertEquals(bytes.length, source.size());
        assertTrue(source.wasStreamOpened() && source.wasStreamClosed());
    
        // test that we can get the size even if skip() isn't supported
        assertEquals(bytes.length, new TestByteSource(bytes, SKIP_THROWS).size());
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/io/ByteStreamsTest.java

        byte[] bytes = newPreFilledByteArray(100);
        skipHelper(0, 0, new ByteArrayInputStream(bytes));
        skipHelper(50, 50, new ByteArrayInputStream(bytes));
        skipHelper(50, 50, new SlowSkipper(new ByteArrayInputStream(bytes), 1));
        skipHelper(50, 50, new SlowSkipper(new ByteArrayInputStream(bytes), 0));
        skipHelper(100, -1, new ByteArrayInputStream(bytes));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  9. 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)
  10. src/main/java/jcifs/smb1/util/Base64.java

         * Base-64 encodes the supplied block of data.  Line wrapping is not
         * applied on output.
         *
         * @param bytes The block of data that is to be Base-64 encoded.
         * @return A <code>String</code> containing the encoded data.
         */
        public static String encode(byte[] bytes) {
            int length = bytes.length;
            if (length == 0) return "";
            StringBuffer buffer =
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Fri Mar 22 20:39:42 GMT 2019
    - 3.7K bytes
    - Viewed (0)
Back to top