net.wimpi.modbus.io
Class ASCIIInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
net.wimpi.modbus.io.ASCIIInputStream
- All Implemented Interfaces:
- Closeable
public class ASCIIInputStream
- extends FilterInputStream
Class implementing a specialized InputStream which
decodes characters read from the raw stream into bytes.
Note that the characters denoting start and end of a frame
as given by the specification are exceptions;
They are translated to the "virtual" FRAME_START and FRAME_END.
- Version:
- @version@ (@date@)
- Author:
- Dieter Wimberger
- See Also:
ModbusASCIITransport.FRAME_START
,
ModbusASCIITransport.FRAME_END
Method Summary |
int |
read()
Reads a byte from the ASCII encoded stream. |
ASCIIInputStream
public ASCIIInputStream(InputStream in)
- Constructs a new ASCIIInputStream instance
reading from the given InputStream.
- Parameters:
in
- a base input stream to be wrapped.
read
public int read()
throws IOException
- Reads a byte from the ASCII encoded stream.
- Overrides:
read
in class FilterInputStream
- Returns:
- int the byte read from the stream.
- Throws:
IOException
- if an I/O error occurs.
Copyright © 2010. All Rights Reserved.