Package software.amazon.awssdk.testutils
Class UnreliableRandomInputStream
java.lang.Object
java.io.InputStream
software.amazon.awssdk.testutils.RandomInputStream
software.amazon.awssdk.testutils.UnreliableRandomInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Subclass of RandomInputStream that, in addition to spitting out a set length
of random characters, throws an IOException. Intended for testing error
recovery in the client library.
-
Field Summary
Fields inherited from class software.amazon.awssdk.testutils.RandomInputStream
lengthInBytes, remainingBytes -
Constructor Summary
ConstructorsConstructorDescriptionUnreliableRandomInputStream(long lengthInBytes) Constructs a new unreliable random data input stream of the specified number of bytes. -
Method Summary
Methods inherited from class software.amazon.awssdk.testutils.RandomInputStream
getBytesReadMethods inherited from class java.io.InputStream
available, close, mark, markSupported, read, reset, skip
-
Constructor Details
-
UnreliableRandomInputStream
public UnreliableRandomInputStream(long lengthInBytes) Constructs a new unreliable random data input stream of the specified number of bytes.- Parameters:
lengthInBytes- The number of bytes of data contained in the new stream.
-
-
Method Details
-
read
- Overrides:
readin classRandomInputStream- Throws:
IOException- See Also:
-
read
- Overrides:
readin classRandomInputStream- Throws:
IOException
-