Closeable, AutoCloseableUnreliableRandomInputStreampublic class RandomInputStream extends InputStream
| Constructor | Description |
|---|---|
RandomInputStream(long lengthInBytes) |
Constructs a new InputStream, which will return the specified amount
of bytes of random ASCII characters.
|
RandomInputStream(long lengthInBytes,
boolean binaryData) |
Creates a new random input stream of specified length, and specifies
whether the stream should be full on binary or character data.
|
| Modifier and Type | Method | Description |
|---|---|---|
long |
getBytesRead() |
|
int |
read() |
|
int |
read(byte[] b,
int off,
int len) |
available, close, mark, markSupported, read, readAllBytes, readNBytes, reset, skip, transferTopublic RandomInputStream(long lengthInBytes)
lengthInBytes - The size in bytes of the total data returned by this
stream.public RandomInputStream(long lengthInBytes,
boolean binaryData)
lengthInBytes - The number of bytes in the stream.binaryData - Whether binary or character data should be generated.public int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic long getBytesRead()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.