protected final class ByteArrayBodyGenerator.ByteBody extends Object implements Body
| Modifier | Constructor and Description |
|---|---|
protected |
ByteBody() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getContentLength()
Gets the length of the body.
|
long |
read(ByteBuffer byteBuffer)
Reads the next chunk of bytes from the body.
|
public long getContentLength()
BodygetContentLength in interface Bodypublic long read(ByteBuffer byteBuffer) throws IOException
Bodyread in interface BodybyteBuffer - 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()
close in interface Closeableclose in interface AutoCloseableCopyright © 2019. All Rights Reserved.