com.dalsemi.comm
Class InternalCommPort

java.lang.Object
  |
  +--com.dalsemi.comm.InternalCommPort

public abstract class InternalCommPort
extends Object

This class implements a generic communications port.


Constructor Summary
InternalCommPort()
           
 
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  InputStream getInputStream()
          Gets an InputStream for the port.
abstract  int getOutputBufferSize()
          Gets the size of the Output Buffer.
abstract  OutputStream getOutputStream()
          Gets 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

InternalCommPort

public InternalCommPort()
Method Detail

open

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

close

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

getInputStream

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

getOutputStream

public abstract OutputStream getOutputStream()
                                      throws IOException
Gets an OutputStream for the port.
Returns:
OutputStream attached to this port
Throws:
IOException -  

enableReceiveTimeout

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

disableReceiveTimeout

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

setReceiveTimeout

public abstract void setReceiveTimeout(int timeout)
                                throws javax.comm.UnsupportedCommOperationException
Sets the Receive timeout value.
Parameters:
timeout - timeout value in milliseconds
Throws:
javax.comm.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 javax.comm.UnsupportedCommOperationException
Sets the size of the InputBuffer.
Parameters:
size - desired new size for the input buffer
Throws:
javax.comm.UnsupportedCommOperationException -  

setOutputBufferSize

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