|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.Reader
java.io.BufferedReader
edu.sdsc.inca.protocol.ProtocolReader
public class ProtocolReader
| Field Summary | |
|---|---|
protected boolean |
closed
|
static int |
CR
|
static int |
LF
|
protected static org.apache.log4j.Logger |
logger
|
static int |
MAX_COMMAND_LENGTH
|
static int |
SP
|
| Fields inherited from class java.io.Reader |
|---|
lock |
| Constructor Summary | |
|---|---|
ProtocolReader(java.io.InputStream input)
Create a buffering protocol-input stream that uses a default-sized input buffer. |
|
ProtocolReader(java.io.InputStream input,
int i)
Create a buffering character-input stream that uses an input buffer of the specified size. |
|
ProtocolReader(java.io.Reader reader)
Create a buffering protocol-input stream that uses a default-sized input buffer. |
|
ProtocolReader(java.io.Reader reader,
int i)
Create a buffering character-input stream that uses an input buffer of the specified size. |
|
| Method Summary | |
|---|---|
void |
close()
Closes the reader. |
boolean |
isClosed()
Indicates whether or not the reader has been closed. |
java.lang.String |
peekCommand()
Returns the next command from the stream, or null on end. |
Statement |
readStatement()
Reads a complete statement from the input stream, or null if the stream has been closed. |
java.lang.String |
readStatement(java.io.Writer outStream)
Reads a complete statement from the input stream, or null if the stream has been closed. |
| Methods inherited from class java.io.BufferedReader |
|---|
mark, markSupported, read, read, readLine, ready, reset, skip |
| Methods inherited from class java.io.Reader |
|---|
read, read |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_COMMAND_LENGTH
public static final int CR
public static final int LF
public static final int SP
protected static org.apache.log4j.Logger logger
protected boolean closed
| Constructor Detail |
|---|
public ProtocolReader(java.io.Reader reader,
int i)
reader - the reader that the data can be read fromi - size of the input bufferpublic ProtocolReader(java.io.Reader reader)
reader - the reader that the protocol can be read from
public ProtocolReader(java.io.InputStream input,
int i)
input - the stream that the data can be read fromi - size of the input bufferpublic ProtocolReader(java.io.InputStream input)
input - the stream that the protocol can be read from| Method Detail |
|---|
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.BufferedReaderjava.io.IOException - on a close errorpublic boolean isClosed()
public java.lang.String peekCommand()
throws java.io.IOException,
ProtocolException
java.io.IOException - on a read error
ProtocolException - if the contents of the read are malformed
public Statement readStatement()
throws java.io.IOException,
ProtocolException
java.io.IOException - on a read error
ProtocolException - if the contents of the read are malformed
public java.lang.String readStatement(java.io.Writer outStream)
throws java.io.IOException,
ProtocolException
outStream - a stream to write the statement data to
java.io.IOException - on a read error
ProtocolException - if the contents of the read are malformed
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||