Class VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel.Response

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private T connection
      The connection representing this response.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Response​(T connection)
      Creates a new response for a persistent byte channel.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      int read​(byte[] buffer)
      Reads a buffer from the target VM.
      • Methods inherited from class java.lang.Object

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

      • connection

        private final T connection
        The connection representing this response.
    • Constructor Detail

      • Response

        private Response​(T connection)
        Creates a new response for a persistent byte channel.
        Parameters:
        connection - The connection representing this response.
    • Method Detail

      • read

        public int read​(byte[] buffer)
                 throws java.io.IOException
        Reads a buffer from the target VM.
        Specified by:
        read in interface VirtualMachine.ForHotSpot.Connection.Response
        Parameters:
        buffer - The buffer to read to.
        Returns:
        The bytes read or -1 if no more bytes could be read.
        Throws:
        java.io.IOException - If an I/O exception occurred.
      • 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