Class PageantLibrary.PipeImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private com.sun.jna.platform.win32.WinNT.HANDLE file  
      private LibraryHolder libs  
      private com.sun.jna.Pointer memory  
      private byte[] name  
      private long readPos  
      private com.sun.jna.platform.win32.WinDef.HWND window  
    • Constructor Summary

      Constructors 
      Constructor Description
      PipeImpl​(LibraryHolder libs, com.sun.jna.platform.win32.WinDef.HWND window, java.lang.String name, com.sun.jna.platform.win32.WinNT.HANDLE file, com.sun.jna.Pointer memory)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      private com.sun.jna.Pointer init​(PageantLibrary.CopyStruct c)  
      void receive​(byte[] data)
      Reads bytes from the pipe until data is full.
      void send​(byte[] message)
      Send the given message.
      • Methods inherited from class java.lang.Object

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

      • window

        private final com.sun.jna.platform.win32.WinDef.HWND window
      • name

        private final byte[] name
      • file

        private final com.sun.jna.platform.win32.WinNT.HANDLE file
      • memory

        private final com.sun.jna.Pointer memory
      • readPos

        private long readPos
    • Constructor Detail

      • PipeImpl

        PipeImpl​(LibraryHolder libs,
                 com.sun.jna.platform.win32.WinDef.HWND window,
                 java.lang.String name,
                 com.sun.jna.platform.win32.WinNT.HANDLE file,
                 com.sun.jna.Pointer memory)
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • send

        public void send​(byte[] message)
                  throws java.io.IOException
        Description copied from interface: PageantLibrary.Pipe
        Send the given message.
        Specified by:
        send in interface PageantLibrary.Pipe
        Parameters:
        message - to send
        Throws:
        java.io.IOException - on errors
      • receive

        public void receive​(byte[] data)
                     throws java.io.IOException
        Description copied from interface: PageantLibrary.Pipe
        Reads bytes from the pipe until data is full.
        Specified by:
        receive in interface PageantLibrary.Pipe
        Parameters:
        data - to read
        Throws:
        java.io.IOException - on errors