protected final class ByteArrayBodyGenerator.ByteBody extends Object implements Body
Body.BodyState| Modifier | Constructor and Description |
|---|---|
protected |
ByteBody() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getContentLength()
Gets the length of the body.
|
Body.BodyState |
transferTo(io.netty.buffer.ByteBuf target)
Reads the next chunk of bytes from the body.
|
public long getContentLength()
BodygetContentLength in interface Bodypublic Body.BodyState transferTo(io.netty.buffer.ByteBuf target) throws IOException
BodytransferTo in interface Bodytarget - The buffer to store the chunk in, must not be null.-1 if the body has been read completely.IOException - If the chunk could not be read.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2017. All Rights Reserved.