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 T
connection
The connection representing this response.
-
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.
-
-
-
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 interfaceVirtualMachine.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 interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-