feign
Interface Response.Body

All Superinterfaces:
java.io.Closeable
Enclosing class:
Response

public static interface Response.Body
extends java.io.Closeable


Method Summary
 java.io.InputStream asInputStream()
          It is the responsibility of the caller to close the stream.
 java.io.Reader asReader()
          It is the responsibility of the caller to close the stream.
 boolean isRepeatable()
          True if asInputStream() and asReader() can be called more than once.
 java.lang.Integer length()
          length in bytes, if known.
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

length

java.lang.Integer length()
length in bytes, if known. Null if not.


Note
This is an integer as most implementations cannot do bodies greater than 2GB. Moreover, the scope of this interface doesn't include large bodies.


isRepeatable

boolean isRepeatable()
True if asInputStream() and asReader() can be called more than once.


asInputStream

java.io.InputStream asInputStream()
                                  throws java.io.IOException
It is the responsibility of the caller to close the stream.

Throws:
java.io.IOException

asReader

java.io.Reader asReader()
                        throws java.io.IOException
It is the responsibility of the caller to close the stream.

Throws:
java.io.IOException