com.sun.mail.imap
类 IMAPInputStream

java.lang.Object
  继承者 java.io.InputStream
      继承者 com.sun.mail.imap.IMAPInputStream
所有已实现的接口:
Closeable

public class IMAPInputStream
extends InputStream

This class implements an IMAP data stream.

作者:
John Mani

构造方法摘要
IMAPInputStream(IMAPMessage msg, String section, int max, boolean peek)
          Create an IMAPInputStream.
 
方法摘要
 int available()
          Returns the number of bytes that can be read from this input stream without blocking.
 int read()
          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.
 
从类 java.io.InputStream 继承的方法
close, mark, markSupported, reset, skip
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

IMAPInputStream

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

方法详细信息

read

public 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.

指定者:
InputStream 中的 read
抛出:
IOException

read

public 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.

覆盖:
InputStream 中的 read
抛出:
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.

覆盖:
InputStream 中的 read
抛出:
IOException

available

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

覆盖:
InputStream 中的 available
抛出:
IOException


Copyright © 2013. All Rights Reserved.