public final class MeteredBody extends Object implements Response.Body
Response.Body implementation that keeps track of how many bytes are read.| Constructor and Description |
|---|
MeteredBody(Response.Body body) |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
asInputStream() |
Reader |
asReader() |
Reader |
asReader(Charset charset) |
void |
close() |
long |
count() |
boolean |
isRepeatable() |
Integer |
length() |
public MeteredBody(Response.Body body)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic Integer length()
length in interface Response.Bodypublic boolean isRepeatable()
isRepeatable in interface Response.Bodypublic InputStream asInputStream() throws IOException
asInputStream in interface Response.BodyIOExceptionpublic Reader asReader() throws IOException
asReader in interface Response.BodyIOExceptionpublic long count()
public Reader asReader(Charset charset) throws IOException
asReader in interface Response.BodyIOExceptionCopyright © 2012–2021 OpenFeign. All rights reserved.