Package ghidra.pty

Interface PtyFactory

All Known Implementing Classes:
ConPtyFactory, GhidraSshPtyFactory, LinuxPtyFactory, MacosPtyFactory

public interface PtyFactory
A mechanism for opening pseudo-terminals
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final short
     
    static final short
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Get a human-readable description of the factory
    static PtyFactory
    Choose a factory of local pty's for the host operating system
    default Pty
    Open a new pseudo-terminal of the default size (80 x 25)
    default Pty
    openpty(int cols, int rows)
    Open a new pseudo-terminal
    openpty(short cols, short rows)
    Open a new pseudo-terminal
  • Field Details

  • Method Details

    • local

      static PtyFactory local()
      Choose a factory of local pty's for the host operating system
      Returns:
      the factory
    • openpty

      Pty openpty(short cols, short rows) throws IOException
      Open a new pseudo-terminal
      Parameters:
      cols - the initial width in characters, or 0 to let the system decide both dimensions
      rows - the initial height in characters, or 0 to let the system decide both dimensions
      Returns:
      new new Pty
      Throws:
      IOException - for an I/O error, including cancellation
    • openpty

      default Pty openpty() throws IOException
      Open a new pseudo-terminal of the default size (80 x 25)
      Returns:
      new new Pty
      Throws:
      IOException - for an I/O error, including cancellation
    • openpty

      default Pty openpty(int cols, int rows) throws IOException
      Open a new pseudo-terminal
      Parameters:
      cols - the initial width in characters, or 0 to let the system decide both dimensions
      rows - the initial height in characters, or 0 to let the system decide both dimensions
      Returns:
      new new Pty
      Throws:
      IOException - for an I/O error, including cancellation
    • getDescription

      String getDescription()
      Get a human-readable description of the factory
      Returns:
      the description