Class WindowsSupport


  • public class WindowsSupport
    extends java.lang.Object
    Windows helper to ease Kernel32 usage.
    • Constructor Detail

      • WindowsSupport

        public WindowsSupport()
    • Method Detail

      • getLastErrorMessage

        public static java.lang.String getLastErrorMessage()
      • readByte

        public static int readByte()
      • getConsoleMode

        public static int getConsoleMode()
      • setConsoleMode

        public static void setConsoleMode​(int mode)
      • getWindowsTerminalWidth

        public static int getWindowsTerminalWidth()
      • getWindowsTerminalHeight

        public static int getWindowsTerminalHeight()
      • writeConsole

        public static int writeConsole​(java.lang.String msg)
      • readConsoleInput

        public static Kernel32.INPUT_RECORD[] readConsoleInput​(int count,
                                                               int dwMilliseconds)
                                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • readConsoleInput

        public static Kernel32.INPUT_RECORD[] readConsoleInput​(int count)
                                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • peekConsoleInput

        public static Kernel32.INPUT_RECORD[] peekConsoleInput​(int count,
                                                               int dwMilliseconds)
                                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • peekConsoleInput

        public static Kernel32.INPUT_RECORD[] peekConsoleInput​(int count)
                                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • flushConsoleInputBuffer

        public static void flushConsoleInputBuffer()