Class TermiosData


  • public class TermiosData
    extends java.lang.Object
    Platform-independent holder for POSIX termios fields.

    Mirrors the native struct termios layout: four flag words, input/output speeds, and a control-character array. Used as an intermediate representation between JLine Attributes and the actual native structure provided by JNI or FFM.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int NCCS
      Maximum c_cc array size across supported platforms (Linux NCCS=32, macOS/FreeBSD NCCS=20).
      static int TCSANOW
      Apply attribute changes immediately (tcsetattr action).
    • Constructor Summary

      Constructors 
      Constructor Description
      TermiosData()
      Creates a new instance with all flags and speeds zeroed and all control characters set to 0.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] cc()
      Returns the control characters array.
      long cflag()
      Returns the control mode flags.
      void cflag​(long value)
      Sets the control mode flags.
      long iflag()
      Returns the input mode flags.
      void iflag​(long value)
      Sets the input mode flags.
      long ispeed()
      Returns the input speed (c_ispeed).
      void ispeed​(long value)
      Sets the input speed (c_ispeed).
      long lflag()
      Returns the local mode flags.
      void lflag​(long value)
      Sets the local mode flags.
      long oflag()
      Returns the output mode flags.
      void oflag​(long value)
      Sets the output mode flags.
      long ospeed()
      Returns the output speed (c_ospeed).
      void ospeed​(long value)
      Sets the output speed (c_ospeed).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • NCCS

        public static final int NCCS
        Maximum c_cc array size across supported platforms (Linux NCCS=32, macOS/FreeBSD NCCS=20).
        See Also:
        Constant Field Values
      • TCSANOW

        public static final int TCSANOW
        Apply attribute changes immediately (tcsetattr action). Identical (0) on all supported platforms.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TermiosData

        public TermiosData()
        Creates a new instance with all flags and speeds zeroed and all control characters set to 0.
    • Method Detail

      • iflag

        public long iflag()
        Returns the input mode flags.
      • iflag

        public void iflag​(long value)
        Sets the input mode flags.
      • oflag

        public long oflag()
        Returns the output mode flags.
      • oflag

        public void oflag​(long value)
        Sets the output mode flags.
      • cflag

        public long cflag()
        Returns the control mode flags.
      • cflag

        public void cflag​(long value)
        Sets the control mode flags.
      • lflag

        public long lflag()
        Returns the local mode flags.
      • lflag

        public void lflag​(long value)
        Sets the local mode flags.
      • ispeed

        public long ispeed()
        Returns the input speed (c_ispeed).
      • ispeed

        public void ispeed​(long value)
        Sets the input speed (c_ispeed).
      • ospeed

        public long ospeed()
        Returns the output speed (c_ospeed).
      • ospeed

        public void ospeed​(long value)
        Sets the output speed (c_ospeed).
      • cc

        public byte[] cc()
        Returns the control characters array.