com.dalsemi.comm
Class CommPort

java.lang.Object
  |
  +--com.dalsemi.comm.CommPort
Direct Known Subclasses:
SerialPort

public abstract class CommPort
extends java.lang.Object

This class implements a generic communications port.


Constructor Summary
CommPort()
           
 
Method Summary
abstract  void close()
          Closes the port for communication.
abstract  void disableReceiveTimeout()
          Disables timeouts while receiving data.
abstract  void enableReceiveTimeout()
          Enables timeouts while receiving data.
abstract  int getInputBufferSize()
          gets the size of the Input Buffer.
abstract  java.io.InputStream getInputStream()
          Gets an InputStream for the port.
abstract  int getOutputBufferSize()
          gets the size of the Output Buffer.
abstract  java.io.OutputStream getOutputStream()
          Get an OutputStream for the port.
abstract  boolean isReceiveTimeoutEnabled()
          Returns true if ReceiveTimeout is enabled
abstract  void open()
          Opens the port for communication.
abstract  void setInputBufferSize(int size)
          sets the size of the InputBuffer.
abstract  void setOutputBufferSize(int size)
          Sets the size of the OutputBuffer.
abstract  void setReceiveTimeout(int timeout)
          Sets the Receive timeout value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommPort

public CommPort()
Method Detail

open

public abstract void open()
                   throws java.io.IOException
Opens the port for communication.
Throws:
java.io.IOException -  

close

public abstract void close()
                    throws java.io.IOException
Closes the port for communication.
Throws:
java.io.IOException -  

getInputStream

public abstract java.io.InputStream getInputStream()
                                            throws java.io.IOException
Gets an InputStream for the port.
Throws:
java.io.IOException -  

getOutputStream

public abstract java.io.OutputStream getOutputStream()
                                              throws java.io.IOException
Get an OutputStream for the port.
Throws:
java.io.IOException -  

enableReceiveTimeout

public abstract void enableReceiveTimeout()
                                   throws UnsupportedCommOperationException
Enables timeouts while receiving data.
Throws:
UnsupportedCommOperationException -  

disableReceiveTimeout

public abstract void disableReceiveTimeout()
                                    throws UnsupportedCommOperationException
Disables timeouts while receiving data.
Throws:
UnsupportedCommOperationException -  

setReceiveTimeout

public abstract void setReceiveTimeout(int timeout)
                                throws UnsupportedCommOperationException
Sets the Receive timeout value.
Throws:
UnsupportedCommOperationException -  

isReceiveTimeoutEnabled

public abstract boolean isReceiveTimeoutEnabled()
Returns true if ReceiveTimeout is enabled

getInputBufferSize

public abstract int getInputBufferSize()
gets the size of the Input Buffer.

getOutputBufferSize

public abstract int getOutputBufferSize()
gets the size of the Output Buffer.

setInputBufferSize

public abstract void setInputBufferSize(int size)
                                 throws UnsupportedCommOperationException
sets the size of the InputBuffer.
Parameters:
size - desired new size for the input buffer.
Throws:
UnsupportedCommOperationException -  

setOutputBufferSize

public abstract void setOutputBufferSize(int size)
                                  throws UnsupportedCommOperationException
Sets the size of the OutputBuffer.
Parameters:
size - desired new size for the output buffer.
Throws:
UnsupportedCommOperationException -