Class SocketUtils.MockInputStream
java.lang.Object
java.io.InputStream
de.iip_ecosphere.platform.deviceMgt.ssh.SocketUtils.MockInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
SocketUtils
Implements a mocked input stream.
- Author:
- Dennis Pidun, University of Hildesheim
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMockInputStream(String payload) Creates a mocking input stream with a given payload. -
Method Summary
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Field Details
-
payload
-
index
private int index
-
-
Constructor Details
-
MockInputStream
Creates a mocking input stream with a given payload.- Parameters:
payload- the payload
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-