Package com.amazonaws.test.util
Class UnreliableRandomInputStream
java.lang.Object
java.io.InputStream
com.amazonaws.test.util.RandomInputStream
com.amazonaws.test.util.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.
- Author:
- Jason Fulghum <fulghum@amazon.com>
-
Field Summary
Fields inherited from class com.amazonaws.test.util.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 com.amazonaws.test.util.RandomInputStream
getBytesRead
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
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:
read
in classRandomInputStream
- Throws:
IOException
- See Also:
-
com.amazonaws.util.RandomInputStream#read()
-
read
- Overrides:
read
in classRandomInputStream
- Throws:
IOException
-