This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


com.sun.mail.imap
class IMAPInputStream

com.sun.mail.imap.IMAPInputStream

public class IMAPInputStream
extends InputStream

This class implements an IMAP data stream.


Constructor Summary
IMAPInputStream(IMAPMessage msg, String section, int max, boolean peek)

          Create an IMAPInputStream.
 
Method Summary
 int

          Returns the number of bytes that can be read from this input stream without blocking.
 int

          Reads the next byte of data from this buffered input stream.
 int
read(byte[] b)

          Reads up to b.length bytes of data from this input stream into an array of bytes.
 int
read(byte[] b, int off, int len)

          Reads up to len bytes of data from this input stream into the given buffer.
 

Constructor Detail

IMAPInputStream

public IMAPInputStream(IMAPMessage msg,
                       String section,
                       int max,
                       boolean peek)
Create an IMAPInputStream.

Parameters:
msg
section
max
peek
Method Detail

available

public synchronized int available()
                           throws IOException
Returns the number of bytes that can be read from this input stream without blocking.

Overrides:
available in class InputStream
Throws:
IOException

read

public synchronized int read()
                      throws IOException
Reads the next byte of data from this buffered input stream. If no byte is available, the value -1 is returned.

Overrides:
read in class InputStream
Throws:
IOException

read

public int read(byte[] b)
         throws IOException
Reads up to b.length bytes of data from this input stream into an array of bytes.

Returns the total number of bytes read into the buffer, or -1 is there is no more data.

Note that this method mimics the "weird !" semantics of BufferedInputStream in that the number of bytes actually returned may be less that the requested value. So callers of this routine should be aware of this and must check the return value to insure that they have obtained the requisite number of bytes.

Overrides:
read in class InputStream
Parameters:
b
Throws:
IOException

read

public synchronized int read(byte[] b,
                             int off,
                             int len)
                      throws IOException
Reads up to len bytes of data from this input stream into the given buffer.

Returns the total number of bytes read into the buffer, or -1 if there is no more data.

Note that this method mimics the "weird !" semantics of BufferedInputStream in that the number of bytes actually returned may be less that the requested value. So callers of this routine should be aware of this and must check the return value to insure that they have obtained the requisite number of bytes.

Overrides:
read in class InputStream
Parameters:
b
off
len
Throws:
IOException


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention. The official Sun™ documentation can be found here at http://java.sun.com/products/javamail/javadocs/index.html.