Top Description Fields Constructors Methods
com.sun.mail.iap

public Class ResponseInputStream

extends Object
Class Inheritance
Imports
java.io.*, com.sun.mail.iap.ByteArray, com.sun.mail.util.ASCIIUtility

Inputstream that is used to read a Response.
Authors
Arun Krishnan, Bill Shannon

Field Summary

Modifier and TypeField and Description
private BufferedInputStream
private static final int
private static final int
private static final int

Constructor Summary

AccessConstructor and Description
public
ResponseInputStream(InputStream
the InputStream to wrap
in
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

number of bytes available
available
()

How much buffered data do we have?

public ByteArray

Returns:

ByteArray that contains the Response
readResponse
()

Read a Response from the InputStream.

public ByteArray

Returns:

ByteArray that contains the Response
readResponse
(ByteArray
the ByteArray in which to store the response, or null
ba
)

Read a Response from the InputStream.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

binback to summary
private BufferedInputStream bin
incrementSlopback to summary
private static final int incrementSlop
maxIncrementback to summary
private static final int maxIncrement
minIncrementback to summary
private static final int minIncrement

Constructor Detail

ResponseInputStreamback to summary
public ResponseInputStream(InputStream in)

Constructor.

Parameters
in:InputStream

the InputStream to wrap

Method Detail

availableback to summary
public int available() throws IOException

How much buffered data do we have?

Returns:int

number of bytes available

Exceptions
IOException:
if the stream has been closed
Since
JavaMail 1.5.4
readResponseback to summary
public ByteArray readResponse() throws IOException

Read a Response from the InputStream.

Returns:ByteArray

ByteArray that contains the Response

Exceptions
IOException:
for I/O errors
readResponseback to summary
public ByteArray readResponse(ByteArray ba) throws IOException

Read a Response from the InputStream.

Parameters
ba:ByteArray

the ByteArray in which to store the response, or null

Returns:ByteArray

ByteArray that contains the Response

Exceptions
IOException:
for I/O errors