Class ResponseInputStream


  • public class ResponseInputStream
    extends Object
    Inputstream that is used to read a Response.
    • Constructor Detail

      • ResponseInputStream

        public ResponseInputStream​(InputStream in)
        Constructor.
        Parameters:
        in - the InputStream to wrap
    • Method Detail

      • readResponse

        public ByteArray readResponse()
                               throws IOException
        Read a Response from the InputStream.
        Returns:
        ByteArray that contains the Response
        Throws:
        IOException - for I/O errors
      • readResponse

        public ByteArray readResponse​(ByteArray ba)
                               throws IOException
        Read a Response from the InputStream.
        Parameters:
        ba - the ByteArray in which to store the response, or null
        Returns:
        ByteArray that contains the Response
        Throws:
        IOException - for I/O errors
      • available

        public int available()
                      throws IOException
        How much buffered data do we have?
        Returns:
        number of bytes available
        Throws:
        IOException - if the stream has been closed
        Since:
        JavaMail 1.5.4