jcontrol.io
Interface ComplexInputStream

All Superinterfaces:
BasicInputStream
All Known Implementing Classes:
FT1_2, RS232

public interface ComplexInputStream
extends BasicInputStream

Provides a set of high-level communication methods for reading.

Author:
boehme
Available on JControl Devices:
all

Method Summary
 String readUTF8()
          Reads a single String from the stream.
 
Methods inherited from interface jcontrol.io.BasicInputStream
close, read, read
 

Method Detail

readUTF8

String readUTF8()
                throws IOException
Reads a single String from the stream. This is a blocking operation, if there is no data available the current Thread is yielded and should be woken up if data arrives. Implementing classes may throw an IOException if a timeout is reached. The String is received in raw UTF8-Format with two preceiding bytes specifying the size of the String. The String will be newly constructed

Returns:
the String read
Throws:
IOException - if an error occurs
See Also:
String