Class FakeInputStream

java.lang.Object
java.io.InputStream
fr.gouv.vitam.common.junit.FakeInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class FakeInputStream extends InputStream
Fake InputStream: test class only
  • Constructor Details

    • FakeInputStream

      public FakeInputStream(long limit)
      Constructor of Fake InputStream

      Preferred constructor
      Parameters:
      limit - the total size of the InputStream
    • FakeInputStream

      public FakeInputStream(long limit, boolean block)
      Constructor of Fake InputStream
      Parameters:
      limit - the total size of the InputStream
      block - True means the byte are read per block and False means one by one read
    • FakeInputStream

      public FakeInputStream(long limit, boolean block, boolean useRandom)
      Constructor of Fake InputStream
      Parameters:
      limit - the total size of the InputStream
      block - True means the byte are read per block and False means one by one read
      useRandom - True use random values for each bytes, else 42 for each
  • Method Details