com.sun.spot.client
Class SerialPortWrapper
java.lang.Object
com.sun.spot.client.SerialPortWrapper
public class SerialPortWrapper
- extends Object
SerialPortWrapper wraps an RXTX SerialPort to centralise the parameters for opening it,
and to provide easy access to its streams. The read stream also works around a timeout bug
in RXTX.
TODO replace duplicate code in spotfinder and in host-agent
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SerialPortWrapper
public SerialPortWrapper(String port,
IUI ui)
throws IOException
- Throws:
IOException
getOutputStream
public OutputStream getOutputStream()
getInputStream
public InputStream getInputStream()
getByte
public int getByte()
throws IOException
- Throws:
IOException
close
public void close()
Copyright © 2006, 2007 Sun Microsystems, Inc. All Rights Reserved.