Package net.bytebuddy.agent
Class VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel.Response
- java.lang.Object
-
- net.bytebuddy.agent.VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel.Response
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,VirtualMachine.ForHotSpot.Connection.Response
- Enclosing class:
- VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel<T>
private class VirtualMachine.ForHotSpot.Connection.OnPersistentByteChannel.Response extends java.lang.Object implements VirtualMachine.ForHotSpot.Connection.Response
A response of a persistent byte channel.
-
-
Field Summary
Fields Modifier and Type Field Description private TconnectionThe connection representing this response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intread(byte[] buffer)Reads a buffer from the target VM.
-
-
-
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.IOExceptionReads a buffer from the target VM.- Specified by:
readin interfaceVirtualMachine.ForHotSpot.Connection.Response- Parameters:
buffer- The buffer to read to.- Returns:
- The bytes read or
-1if 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:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-