public final class FeedableBodyGenerator.PushBody extends Object implements Body
Constructor and Description |
---|
PushBody() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
long |
getContentLength()
Gets the length of the body.
|
long |
read(ByteBuffer buffer)
Reads the next chunk of bytes from the body.
|
public long getContentLength()
Body
getContentLength
in interface Body
public long read(ByteBuffer buffer) throws IOException
Body
read
in interface Body
buffer
- 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 Closeable
close
in interface AutoCloseable
Copyright © 2016. All Rights Reserved.