Class MingwSupport


  • public class MingwSupport
    extends java.lang.Object
    Support for MINGW terminals. Those terminals do not use the underlying windows terminal and there's no CLibrary available in these environments. We have to rely on calling stty.exe and tty.exe to obtain the terminal name and width.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.regex.Pattern columnsPatterns  
      private java.lang.String sttyCommand  
      private java.lang.String ttyCommand  
    • Constructor Summary

      Constructors 
      Constructor Description
      MingwSupport()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getConsoleName​(boolean stdout)  
      private java.lang.ProcessBuilder.Redirect getRedirect​(java.io.FileDescriptor fd)
      This requires --add-opens java.base/java.lang=ALL-UNNAMED
      int getTerminalWidth​(java.lang.String name)  
      private static java.lang.String waitAndCapture​(java.lang.Process p)  
      • Methods inherited from class java.lang.Object

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

      • sttyCommand

        private final java.lang.String sttyCommand
      • ttyCommand

        private final java.lang.String ttyCommand
      • columnsPatterns

        private final java.util.regex.Pattern columnsPatterns
    • Constructor Detail

      • MingwSupport

        public MingwSupport()
    • Method Detail

      • getConsoleName

        public java.lang.String getConsoleName​(boolean stdout)
      • getTerminalWidth

        public int getTerminalWidth​(java.lang.String name)
      • waitAndCapture

        private static java.lang.String waitAndCapture​(java.lang.Process p)
                                                throws java.io.IOException,
                                                       java.lang.InterruptedException
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • getRedirect

        private java.lang.ProcessBuilder.Redirect getRedirect​(java.io.FileDescriptor fd)
                                                       throws java.lang.ReflectiveOperationException
        This requires --add-opens java.base/java.lang=ALL-UNNAMED
        Throws:
        java.lang.ReflectiveOperationException