Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 94 for Len (0.18 sec)

  1. guava-tests/benchmark/com/google/common/base/StringsRepeatBenchmark.java

          }
        }
      }
    
      private static String mikeRepeat(String string, int count) {
        final int len = string.length();
        char[] strCopy = new char[len * Integer.highestOneBit(count)];
        string.getChars(0, len, strCopy, 0);
    
        char[] array = new char[len * count];
    
        int strCopyLen = len;
        int pos = 0;
        while (count != 0) {
          if ((count & 1) != 0) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Sep 17 20:24:24 GMT 2021
    - 3.3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/io/ByteSourceTester.java

          int off = expected.length == 0 ? 0 : random.nextInt(expected.length);
          int len = expected.length == 0 ? 4 : random.nextInt(expected.length - off);
    
          ByteSourceFactory sliced = SourceSinkFactories.asSlicedByteSourceFactory(factory, off, len);
          suite.addTest(suiteForBytes(sliced, bytes, name + ".slice[long, long]", desc, false));
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.6K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/CharSequenceReader.java

      }
    
      @Override
      public synchronized int read(char[] cbuf, int off, int len) throws IOException {
        checkPositionIndexes(off, off + len, cbuf.length);
        checkOpen();
        requireNonNull(seq); // safe because of checkOpen
        if (!hasRemaining()) {
          return -1;
        }
        int charsToRead = Math.min(len, remaining());
        for (int i = 0; i < charsToRead; i++) {
          cbuf[off + i] = seq.charAt(pos++);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/ByteStreams.java

      // (You know that it's either going to read len bytes or stop at EOF.)
      public static int read(InputStream in, byte[] b, int off, int len) throws IOException {
        checkNotNull(in);
        checkNotNull(b);
        if (len < 0) {
          throw new IndexOutOfBoundsException(String.format("len (%s) cannot be negative", len));
        }
        checkPositionIndexes(off, off + len, b.length);
        int total = 0;
        while (total < len) {
    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)
  5. guava-tests/test/com/google/common/io/ByteSourceTest.java

            new ByteProcessor<byte[]>() {
              int pos;
    
              @Override
              public boolean processBytes(byte[] buf, int off, int len) throws IOException {
                System.arraycopy(buf, off, processedBytes, pos, len);
                pos += len;
                return true;
              }
    
              @Override
              public byte[] getResult() {
                return processedBytes;
              }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/io/MultiInputStream.java

          if (result != -1) {
            return result;
          }
          advance();
        }
        return -1;
      }
    
      @Override
      public int read(byte[] b, int off, int len) throws IOException {
        checkNotNull(b);
        while (in != null) {
          int result = in.read(b, off, len);
          if (result != -1) {
            return result;
          }
          advance();
        }
        return -1;
      }
    
      @Override
    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)
  7. android/guava/src/com/google/common/hash/HashingInputStream.java

       * the bytes read.
       */
      @Override
      @CanIgnoreReturnValue
      public int read(byte[] bytes, int off, int len) throws IOException {
        int numOfBytesRead = in.read(bytes, off, len);
        if (numOfBytesRead != -1) {
          hasher.putBytes(bytes, off, numOfBytesRead);
        }
        return numOfBytesRead;
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 3K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/hash/Fingerprint2011.java

      private static final long K3 = 0xc6a4a7935bd1e995L;
    
      @Override
      public HashCode hashBytes(byte[] input, int off, int len) {
        checkPositionIndexes(off, off + len, input.length);
        return HashCode.fromLong(fingerprint(input, off, len));
      }
    
      @Override
      public int bits() {
        return 64;
      }
    
      @Override
      public String toString() {
        return "Hashing.fingerprint2011()";
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Dec 28 17:50:25 GMT 2021
    - 6.5K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java

        @Override
        protected void update(byte b) {
          out.write(b);
        }
    
        @Override
        protected void update(byte[] b, int off, int len) {
          out.write(b, off, len);
        }
    
        byte[] bytes() {
          return out.toByteArray();
        }
    
        void assertBytes(byte[] expected) {
          assertArrayEquals(expected, bytes());
        }
    
        @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/hash/AbstractHasher.java

        return putBytes(bytes, 0, bytes.length);
      }
    
      @Override
      @CanIgnoreReturnValue
      public Hasher putBytes(byte[] bytes, int off, int len) {
        Preconditions.checkPositionIndexes(off, off + len, bytes.length);
        for (int i = 0; i < len; i++) {
          putByte(bytes[off + i]);
        }
        return this;
      }
    
      @Override
      @CanIgnoreReturnValue
      public Hasher putBytes(ByteBuffer b) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 3.5K bytes
    - Viewed (0)
Back to top