org.openaltimeter.comms
Class SerialLink
java.lang.Object
org.openaltimeter.comms.SerialLink
public class SerialLink
- extends java.lang.Object
Field Summary |
java.io.InputStream |
in
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
in
public java.io.InputStream in
SerialLink
public SerialLink()
getSerialPorts
public static java.util.List<java.lang.String> getSerialPorts()
connect
public void connect(java.lang.String port,
int rate)
throws NoSuchPortException,
PortInUseException,
UnsupportedCommOperationException,
java.io.IOException,
java.util.TooManyListenersException
- Throws:
NoSuchPortException
PortInUseException
UnsupportedCommOperationException
java.io.IOException
java.util.TooManyListenersException
disconnect
public void disconnect()
sendReset
public void sendReset()
clearInput
public void clearInput()
write
public void write(char c)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(java.lang.String s)
throws java.io.IOException
- Throws:
java.io.IOException
readString
public java.lang.String readString(int bufferSize)
throws java.io.IOException
- Throws:
java.io.IOException
startBufferedRead
public void startBufferedRead(int bufferSize)
stopBufferedRead
public void stopBufferedRead()
available
public int available()
getBuffer
public byte[] getBuffer()