接口 Modbus4JInputStreamCallback
public interface Modbus4JInputStreamCallback
A callback interface for input streams.
NOTE: if the InputStreamEPoll instance is terminated, any running processes will be destroyed without any
notification to this callback.
-
方法概要
修饰符和类型方法说明voidclosed()Called when the closure of the input stream is detected.voidinput(byte[] buf, int len) Called when content is read from the input stream.voidCalled if there is anIOExceptionwhile reading input stream.voidCalled if the InputStreamEPoll instance was terminated while the input stream was still registered.
-
方法详细资料
-
input
void input(byte[] buf, int len) Called when content is read from the input stream.- 参数:
buf- the content that was read. This is a shared byte array. Contents can be manipulated within this call, but the array itself should not be stored beyond the call since the contents will be changed.len- the length of content that was read.
-
closed
void closed()Called when the closure of the input stream is detected. -
ioException
Called if there is anIOExceptionwhile reading input stream.- 参数:
e- the exception that was received
-
terminated
void terminated()Called if the InputStreamEPoll instance was terminated while the input stream was still registered.
-