Package feign
Interface Response.Body
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- Enclosing class:
- Response
public static interface Response.Body extends java.io.Closeable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.io.InputStreamasInputStream()It is the responsibility of the caller to close the stream.java.io.ReaderasReader()It is the responsibility of the caller to close the stream.java.io.ReaderasReader(java.nio.charset.Charset charset)booleanisRepeatable()True ifasInputStream()andasReader()can be called more than once.java.lang.Integerlength()length in bytes, if known.
-
-
-
Method Detail
-
length
java.lang.Integer length()
length in bytes, if known. Null if unknown or greater thanInteger.MAX_VALUE.
Note
This is an integer as most implementations cannot do bodies greater than 2GB.
-
isRepeatable
boolean isRepeatable()
True ifasInputStream()andasReader()can be called more than once.
-
asInputStream
java.io.InputStream asInputStream() throws java.io.IOExceptionIt is the responsibility of the caller to close the stream.- Throws:
java.io.IOException
-
asReader
java.io.Reader asReader() throws java.io.IOExceptionIt is the responsibility of the caller to close the stream.- Throws:
java.io.IOException
-
asReader
java.io.Reader asReader(java.nio.charset.Charset charset) throws java.io.IOException- Throws:
java.io.IOException
-
-