Package host.anzo.simon
Class RawChannelInputStream
java.lang.Object
java.io.InputStream
host.anzo.simon.RawChannelInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
InputStream wrapper for SIMON RawChannel
- Since:
- 1.2.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
DEFAULT_BLOCKSIZE
public static final int DEFAULT_BLOCKSIZEDefault block size of 8k- See Also:
-
-
Constructor Details
-
RawChannelInputStream
Creates a new input stream. You need to connect it to SIMON viaSimon.prepareRawChannel(RawChannelDataListener, Object). Pass the output ofgetRawChannelDataListener()asRawChannelDataListener.- Throws:
IOException
-
RawChannelInputStream
- Parameters:
blockSize- the block-size for reading from rawchannel and wriuting to the inputstream pipe- Throws:
IOException- See Also:
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
mark
public void mark(int readlimit) - Overrides:
markin classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
getRawChannelDataListener
Get the underlying SIMON RawChannelDataListener implementation for this input stream.- Returns:
- RawChannelDataListener implementation
-