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.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.
      java.io.Reader asReader​(java.nio.charset.Charset charset)  
      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 unknown or greater than Integer.MAX_VALUE.


        Note
        This is an integer as most implementations cannot do bodies greater than 2GB.
      • 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
      • asReader

        java.io.Reader asReader​(java.nio.charset.Charset charset)
                         throws java.io.IOException
        Throws:
        java.io.IOException