Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 5 of 5 for RandomAmountInputStream (0.18 seconds)

  1. android/guava-tests/test/com/google/common/io/RandomAmountInputStream.java

    import java.util.Random;
    import org.jspecify.annotations.NullUnmarked;
    
    /** Returns a random portion of the requested bytes on each call. */
    @NullUnmarked
    class RandomAmountInputStream extends FilterInputStream {
      private final Random random;
    
      public RandomAmountInputStream(InputStream in, Random random) {
        super(checkNotNull(in));
        this.random = checkNotNull(random);
      }
    
      @Override
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Dec 19 18:03:30 GMT 2024
    - 1.3K bytes
    - Click Count (0)
  2. guava-tests/test/com/google/common/io/RandomAmountInputStream.java

    import java.util.Random;
    import org.jspecify.annotations.NullUnmarked;
    
    /** Returns a random portion of the requested bytes on each call. */
    @NullUnmarked
    class RandomAmountInputStream extends FilterInputStream {
      private final Random random;
    
      public RandomAmountInputStream(InputStream in, Random random) {
        super(checkNotNull(in));
        this.random = checkNotNull(random);
      }
    
      @Override
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Dec 19 18:03:30 GMT 2024
    - 1.3K bytes
    - Click Count (0)
  3. guava-tests/test/com/google/common/io/TestByteSource.java

      @Override
      public boolean wasStreamClosed() {
        return inputStreamClosed;
      }
    
      @Override
      public InputStream openStream() throws IOException {
        inputStreamOpened = true;
        return new RandomAmountInputStream(new In(), new Random());
      }
    
      private final class In extends TestInputStream {
    
        In() throws IOException {
          super(new ByteArrayInputStream(bytes), options);
        }
    
        @Override
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Jul 14 14:44:08 GMT 2025
    - 2K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/io/ByteSourceTester.java

        assertTrue(
            source.contentEquals(
                new ByteSource() {
                  @Override
                  public InputStream openStream() throws IOException {
                    return new RandomAmountInputStream(
                        new ByteArrayInputStream(expected), new Random());
                  }
                }));
      }
    
      public void testRead_usingByteProcessor() throws IOException {
        byte[] readBytes =
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 19 18:53:45 GMT 2026
    - 8.6K bytes
    - Click Count (0)
  5. android/guava-tests/test/com/google/common/io/ByteSourceTester.java

        assertTrue(
            source.contentEquals(
                new ByteSource() {
                  @Override
                  public InputStream openStream() throws IOException {
                    return new RandomAmountInputStream(
                        new ByteArrayInputStream(expected), new Random());
                  }
                }));
      }
    
      public void testRead_usingByteProcessor() throws IOException {
        byte[] readBytes =
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 19 18:53:45 GMT 2026
    - 8.6K bytes
    - Click Count (0)
Back to Top