public class FakeInputStream extends InputStream
Constructor and Description |
---|
FakeInputStream(long limit)
Constructor of Fake InputStream
Preferred constructor |
FakeInputStream(long limit,
boolean block)
Constructor of Fake InputStream
|
FakeInputStream(long limit,
boolean block,
boolean useRandom)
Constructor of Fake InputStream
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
long |
readCount() |
mark, markSupported, reset, skip
public FakeInputStream(long limit)
limit
- the total size of the InputStreampublic FakeInputStream(long limit, boolean block)
limit
- the total size of the InputStreamblock
- True means the byte are read per block and False means one by one readpublic FakeInputStream(long limit, boolean block, boolean useRandom)
limit
- the total size of the InputStreamblock
- True means the byte are read per block and False means one by one readuseRandom
- True use random values for each bytes, else 42 for eachpublic int read()
read
in class InputStream
public int available()
available
in class InputStream
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
public int read(byte[] b, int off, int len)
read
in class InputStream
public int read(byte[] b)
read
in class InputStream
public long readCount()
Copyright © 2018 Vitam. All rights reserved.