jamod at SF

net.wimpi.modbus.io
Class ASCIIInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended bynet.wimpi.modbus.io.ASCIIInputStream

public class ASCIIInputStream
extends java.io.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:
1.2rc1 (09/11/2004)
Author:
Dieter Wimberger
See Also:
ModbusASCIITransport.FRAME_START, ModbusASCIITransport.FRAME_END

Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
ASCIIInputStream(java.io.InputStream in)
          Constructs a new ASCIIInputStream instance reading from the given InputStream.
 
Method Summary
 int read()
          Reads a byte from the ASCII encoded stream.
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASCIIInputStream

public ASCIIInputStream(java.io.InputStream in)
Constructs a new ASCIIInputStream instance reading from the given InputStream.

Parameters:
in - a base input stream to be wrapped.
Method Detail

read

public int read()
         throws java.io.IOException
Reads a byte from the ASCII encoded stream.

Returns:
int the byte read from the stream.
Throws:
java.io.IOException - if an I/O error occurs.

jamod at SF

Copyright © 2002-2004 jamod development team.