public class ConstantInputStream extends SdkInputStream
Modifier and Type | Field and Description |
---|---|
private static java.util.Random |
rand |
private boolean |
randomlyReturnZeros |
private int |
randomZerosCount |
private long |
remaining |
private byte |
val |
Constructor and Description |
---|
ConstantInputStream(long total,
byte val) |
ConstantInputStream(long total,
byte val,
boolean randomlyReturnZeros) |
Modifier and Type | Method and Description |
---|---|
int |
getRandomZerosCount() |
protected java.io.InputStream |
getWrappedInputStream()
Returns the underlying input stream, if any, from the subclass; or null
if there is no underlying input stream.
|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
abort, abortIfNeeded, isMetricActivated, release
private final byte val
private long remaining
private final boolean randomlyReturnZeros
private int randomZerosCount
private static final java.util.Random rand
public ConstantInputStream(long total, byte val)
public ConstantInputStream(long total, byte val, boolean randomlyReturnZeros)
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int getRandomZerosCount()
protected java.io.InputStream getWrappedInputStream()
SdkInputStream
getWrappedInputStream
in class SdkInputStream