| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private byte[] | |
| private int | |
| private int | |
| private boolean | |
| private int | |
| private IMAPMessage | |
| private boolean | |
| private int | |
| private ByteArray | |
| private String | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public | IMAPInputStream(IMAPMessage
the IMAPMessage the data will come from msg, String the IMAP section/part identifier for the data section, int the number of bytes in this section max, boolean peek instead of fetch? peek)Create an IMAPInputStream. |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized int | available()
Overrides java. |
| private void | checkSeen()
Normally the SEEN flag will have been set by now, but if not, force it to be set (as long as the folder isn't open read-only and we're not peeking). |
| private void | |
| private void | forceCheckExpunged()
Do a NOOP to force any untagged EXPUNGE responses and then check if this message is expunged. |
| public synchronized int | read()
Implements abstract java. |
| public synchronized int | read(byte[]
the buffer into which the data is read. b, int the start offset in array off, int b
at which the data is written.the maximum number of bytes to read. len)Overrides java. len bytes of data from this
input stream into the given buffer.
|
| public int | read(byte[]
the buffer into which the data is read. b)Overrides java. b.length bytes of data from this input
stream into an array of bytes.
|
| blksize | back to summary |
|---|---|
| private int blksize | |
| buf | back to summary |
|---|---|
| private byte[] buf | |
| bufcount | back to summary |
|---|---|
| private int bufcount | |
| bufpos | back to summary |
|---|---|
| private int bufpos | |
| lastBuffer | back to summary |
|---|---|
| private boolean lastBuffer | |
| max | back to summary |
|---|---|
| private int max | |
| msg | back to summary |
|---|---|
| private IMAPMessage msg | |
| peek | back to summary |
|---|---|
| private boolean peek | |
| pos | back to summary |
|---|---|
| private int pos | |
| readbuf | back to summary |
|---|---|
| private ByteArray readbuf | |
| section | back to summary |
|---|---|
| private String section | |
| slop | back to summary |
|---|---|
| private static final int slop | |
| IMAPInputStream | back to summary |
|---|---|
| public IMAPInputStream(IMAPMessage msg, String section, int max, boolean peek) Create an IMAPInputStream.
| |
| available | back to summary |
|---|---|
| public synchronized int available() throws IOException Overrides java. Returns the number of bytes that can be read from this input stream without blocking.
| |
| checkSeen | back to summary |
|---|---|
| private void checkSeen() Normally the SEEN flag will have been set by now, but if not, force it to be set (as long as the folder isn't open read-only and we're not peeking). And of course, if there's no folder (e.g., a nested message) don't do anything. | |
| fill | back to summary |
|---|---|
| private void fill() throws IOException Fetch more data from the server. This method assumes that all data has already been read in, hence bufpos > bufcount. | |
| forceCheckExpunged | back to summary |
|---|---|
| private void forceCheckExpunged() throws MessageRemovedIOException, FolderClosedIOException Do a NOOP to force any untagged EXPUNGE responses and then check if this message is expunged. | |
| read | back to summary |
|---|---|
| public synchronized int read() throws IOException Implements abstract java. Reads the next byte of data from this buffered input stream.
If no byte is available, the value
| |
| read | back to summary |
|---|---|
| public synchronized int read(byte[] b, int off, int len) throws IOException Overrides java. Reads up to
Returns the total number of bytes read into the buffer,
or 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.
| |
| read | back to summary |
|---|---|
| public int read(byte[] b) throws IOException Overrides java. Reads up to
Returns the total number of bytes read into the buffer, or
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.
| |