Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for RandomAmountInputStream (0.29 sec)

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

    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Random;
    
    /** Returns a random portion of the requested bytes on each call. */
    class RandomAmountInputStream extends FilterInputStream {
      private final Random random;
    
      public RandomAmountInputStream(InputStream in, Random random) {
        super(checkNotNull(in));
        this.random = checkNotNull(random);
      }
    
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.2K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/io/RandomAmountInputStream.java

    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Random;
    
    /** Returns a random portion of the requested bytes on each call. */
    class RandomAmountInputStream extends FilterInputStream {
      private final Random random;
    
      public RandomAmountInputStream(InputStream in, Random random) {
        super(checkNotNull(in));
        this.random = checkNotNull(random);
      }
    
      @Override
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.2K bytes
    - Viewed (0)
  3. android/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 {
    
        public In() throws IOException {
          super(new ByteArrayInputStream(bytes), options);
        }
    
        @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Apr 21 02:27:51 GMT 2017
    - 1.9K bytes
    - Viewed (0)
  4. 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 {
    
        public In() throws IOException {
          super(new ByteArrayInputStream(bytes), options);
        }
    
        @Override
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Sep 15 13:47:32 GMT 2016
    - 1.9K bytes
    - Viewed (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 =
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 8.6K bytes
    - Viewed (0)
  6. 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 =
    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)
Back to top