Package com.mongodb.internal.connection
Class ResponseBuffers
- java.lang.Object
-
- com.mongodb.internal.connection.ResponseBuffers
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class ResponseBuffers extends java.lang.Object implements java.io.Closeable
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
ByteBuf
getBodyByteBuffer()
Returns a read-only buffer containing the response body.ReplyHeader
getReplyHeader()
Gets the reply header.void
reset()
-
-
-
Method Detail
-
getReplyHeader
public ReplyHeader getReplyHeader()
Gets the reply header.- Returns:
- the reply header
-
getBodyByteBuffer
public ByteBuf getBodyByteBuffer()
Returns a read-only buffer containing the response body. Care should be taken to not use the returned buffer after this instance has been closed.- Returns:
- a read-only buffer containing the response body
-
reset
public void reset()
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-