Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for Len (0.12 sec)

  1. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java

        testThreshold(1000, 100, false, true);
      }
    
      static void write(OutputStream out, byte[] b, int off, int len, boolean singleByte)
          throws IOException {
        if (singleByte) {
          for (int i = off; i < off + len; i++) {
            out.write(b[i]);
          }
        } else {
          out.write(b, off, len);
        }
        out.flush(); // for coverage
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/ImmutableRangeMap.java

        }
        final int off = lowerIndex;
        final int len = upperIndex - lowerIndex;
        ImmutableList<Range<K>> subRanges =
            new ImmutableList<Range<K>>() {
              @Override
              public int size() {
                return len;
              }
    
              @Override
              public Range<K> get(int index) {
                checkElementIndex(index, len);
                if (index == 0 || index == len - 1) {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 14.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/BaseEncoding.java

          checkNotNull(target);
          checkPositionIndexes(off, off + len, bytes.length);
          for (int i = 0; i < len; i += alphabet.bytesPerChunk) {
            encodeChunkTo(target, bytes, off + i, Math.min(alphabet.bytesPerChunk, len - i));
          }
        }
    
        void encodeChunkTo(Appendable target, byte[] bytes, int off, int len) throws IOException {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Mar 15 16:33:32 GMT 2024
    - 41.7K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/CharStreamsTest.java

        return new FilterReader(reader) {
          @Override
          public int read(char[] cbuf, int off, int len) throws IOException {
            // if a buffer isn't being cleared correctly, this method will eventually start being called
            // with a len of 0 forever
            if (len <= 0) {
              fail("read called with a len of " + len);
            }
            // read fewer than the max number of chars to read
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.2K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/CharStreamsTest.java

        return new FilterReader(reader) {
          @Override
          public int read(char[] cbuf, int off, int len) throws IOException {
            // if a buffer isn't being cleared correctly, this method will eventually start being called
            // with a len of 0 forever
            if (len <= 0) {
              fail("read called with a len of " + len);
            }
            // read fewer than the max number of chars to read
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.2K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top