Package purejavacomm

Class CommPort

  • Direct Known Subclasses:
    SerialPort

    public abstract class CommPort
    extends Object
    • Field Detail

    • Constructor Detail

      • CommPort

        public CommPort()
    • Method Detail

      • close

        public void close()
        Closes the communications port.
      • disableReceiveFraming

        public abstract void disableReceiveFraming()
        Disables receive framing.
      • disableReceiveThreshold

        public abstract void disableReceiveThreshold()
        Disables receive threshold.
      • disableReceiveTimeout

        public abstract void disableReceiveTimeout()
        Disables receive timeout.
      • getInputBufferSize

        public abstract int getInputBufferSize()
        Returns the input buffer size in bytes.
        Returns:
        The input buffer size in bytes.
      • getInputStream

        public abstract InputStream getInputStream()
                                            throws IOException
        Returns an input stream.
        Returns:
        An input stream, or null if the port is unidirectional and doesn't support receiving data.
        Throws:
        IOException
      • getName

        public String getName()
        Returns the port name.
        Returns:
        The port name.
      • getOutputBufferSize

        public abstract int getOutputBufferSize()
        Returns the output buffer size in bytes.
        Returns:
        The output buffer size in bytes.
      • getOutputStream

        public abstract OutputStream getOutputStream()
                                              throws IOException
        Returns an output stream.
        Returns:
        An output stream, or null if the port is unidirectional and doesn't support sending data.
        Throws:
        IOException
      • getReceiveFramingByte

        public abstract int getReceiveFramingByte()
        Returns the current byte used for receive framing.
        Returns:
        The current byte used for receive framing.
      • getReceiveThreshold

        public abstract int getReceiveThreshold()
        Returns the integer value of the receive threshold.
        Returns:
        The integer value of the receive threshold.
      • getReceiveTimeout

        public abstract int getReceiveTimeout()
        Returns the integer value of the receive timeout. If the receive timeout is disabled, then the value returned is meaningless.
        Returns:
        The integer value of the receive timeout.
      • isReceiveFramingEnabled

        public abstract boolean isReceiveFramingEnabled()
        Returns true if receive framing is enabled.
        Returns:
        true if receive framing is enabled.
      • isReceiveThresholdEnabled

        public abstract boolean isReceiveThresholdEnabled()
        Returns true if receive threshold is enabled.
        Returns:
        true if receive threshold is enabled.
      • isReceiveTimeoutEnabled

        public abstract boolean isReceiveTimeoutEnabled()
        Returns true if receive timeout is enabled.
        Returns:
        true if receive timeout is enabled.
      • setInputBufferSize

        public abstract void setInputBufferSize​(int size)
        Sets the input buffer size.
        Parameters:
        size -
      • setOutputBufferSize

        public abstract void setOutputBufferSize​(int size)
        Sets the output buffer size.
        Parameters:
        size -