public class ImapRequestLineReader extends Object
| Constructor and Description |
|---|
ImapRequestLineReader(InputStream input,
OutputStream output) |
| Modifier and Type | Method and Description |
|---|---|
void |
commandContinuationRequest()
Sends a server command continuation request '+' back to the client,
requesting more data to be sent.
|
char |
consume()
Consumes the current character in the reader, so that subsequent calls to the request will
provide a new character.
|
char |
consumeAll(char c)
Consumes all given chars.
|
void |
consumeLine()
Consumes whole line till newline.
|
void |
eol()
Moves the request line reader to end of the line, checking that no non-space
character are found.
|
char |
nextChar()
Reads the next character in the current line.
|
char |
nextWordChar()
Reads the next regular, non-space character in the current line.
|
void |
read(byte[] holder)
Reads and consumes a number of characters from the underlying reader,
filling the byte array provided.
|
public ImapRequestLineReader(InputStream input, OutputStream output)
public char nextWordChar()
throws ProtocolException
ProtocolException to be thrown.
This method will continue to return
the same character until the consume() method is called.ProtocolException - If the end-of-line or end-of-stream is reached.public char nextChar()
throws ProtocolException
consume() method is called.ProtocolException - If the end-of-stream is reached.public void eol()
throws ProtocolException
ProtocolException - If more non-space tokens are found in this line,
or the end-of-file is reached.public char consume()
throws ProtocolException
ProtocolException - if a the current character can't be obtained (eg we're at
end-of-file).public void read(byte[] holder)
throws ProtocolException
holder - A byte array which will be filled with bytes read from the underlying reader.ProtocolException - If a char can't be read into each array element.public void commandContinuationRequest()
throws ProtocolException
ProtocolExceptionpublic void consumeLine()
throws ProtocolException
ProtocolException - on error.public char consumeAll(char c)
throws ProtocolException
ProtocolException - on error.Copyright © 2006–2022 Icegreen Technologies. All rights reserved.