|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream java.io.ByteArrayOutputStream org.apache.geronimo.javamail.store.imap.connection.IMAPResponseBuffer
public class IMAPResponseBuffer
Simple extension to the ByteArrayOutputStream to allow inspection of the data while it is being accumulated.
Field Summary |
---|
Fields inherited from class java.io.ByteArrayOutputStream |
---|
buf, count |
Constructor Summary | |
---|---|
IMAPResponseBuffer()
|
Method Summary | |
---|---|
int |
getLiteralLength()
Retrieve an IMAP literal length value from the buffer. |
int |
lastByte()
Return the last byte written to the output stream. |
int |
lastIndex(byte target)
Search backwards through the buffer for a given byte. |
int |
read(byte[] buffer,
int offset,
int length)
Read a buffer of data from the output stream's accumulator buffer. |
int |
read(int index)
Read a character from the byte array output stream buffer at the give position. |
Methods inherited from class java.io.ByteArrayOutputStream |
---|
close, reset, size, toByteArray, toString, toString, toString, write, write, writeTo |
Methods inherited from class java.io.OutputStream |
---|
flush, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IMAPResponseBuffer()
Method Detail |
---|
public int read(int index)
index
- The requested index.
public int read(byte[] buffer, int offset, int length)
buffer
- The target byte array for returning the data.offset
- The offset of the source data within the output stream buffer.length
- The desired length.
public int lastIndex(byte target)
target
- The search character.
public int lastByte()
public int getLiteralLength()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |