Class NGWin32NamedPipeSocket

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class NGWin32NamedPipeSocket
    extends java.net.Socket
    • Field Detail

      • DEFAULT_REQUIRE_STRICT_LENGTH

        static final boolean DEFAULT_REQUIRE_STRICT_LENGTH
        See Also:
        Constant Field Values
      • handle

        private final com.sun.jna.platform.win32.WinNT.HANDLE handle
      • requireStrictLength

        private final boolean requireStrictLength
      • is

        private final java.io.InputStream is
      • os

        private final java.io.OutputStream os
      • readerWaitable

        private final com.sun.jna.platform.win32.WinNT.HANDLE readerWaitable
      • writerWaitable

        private final com.sun.jna.platform.win32.WinNT.HANDLE writerWaitable
    • Constructor Detail

      • NGWin32NamedPipeSocket

        public NGWin32NamedPipeSocket​(com.sun.jna.platform.win32.WinNT.HANDLE handle,
                                      NGWin32NamedPipeSocket.CloseCallback closeCallback,
                                      boolean requireStrictLength)
                               throws java.io.IOException
        The doc for InputStream#read(byte[] b, int off, int len) states that "An attempt is made to read as many as len bytes, but a smaller number may be read." However, using requireStrictLength, NGWin32NamedPipeSocketInputStream can require that len matches up exactly the number of bytes to read.
        Throws:
        java.io.IOException
      • NGWin32NamedPipeSocket

        public NGWin32NamedPipeSocket​(com.sun.jna.platform.win32.WinNT.HANDLE handle,
                                      NGWin32NamedPipeSocket.CloseCallback closeCallback)
                               throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getInputStream

        public java.io.InputStream getInputStream()
        Overrides:
        getInputStream in class java.net.Socket
      • getOutputStream

        public java.io.OutputStream getOutputStream()
        Overrides:
        getOutputStream in class java.net.Socket
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.net.Socket
        Throws:
        java.io.IOException
      • shutdownInput

        public void shutdownInput()
                           throws java.io.IOException
        Overrides:
        shutdownInput in class java.net.Socket
        Throws:
        java.io.IOException
      • shutdownOutput

        public void shutdownOutput()
                            throws java.io.IOException
        Overrides:
        shutdownOutput in class java.net.Socket
        Throws:
        java.io.IOException