| Modifier and Type | Field and Description |
|---|---|
| private static String | ASTRING_CHAR_DELIM
An ASTRING_CHAR is any CHAR delimited by: SPACE | CTL | '(' | ')' | '{' | '%' | '*' | '"' | '\' (CTL is handled in readDelimString.) |
| private static String | ATOM_CHAR_DELIM
An ATOM is any CHAR delimited by: SPACE | CTL | '(' | ')' | '{' | '%' | '*' | '"' | '\' | ']' (CTL is handled in readDelimString.) |
| public static final int | |
| protected byte[] | |
| public static final int | |
| public static final int | |
| protected Exception | |
| private static final int | |
| protected int | |
| public static final int | |
| public static final int | |
| protected int | |
| protected int | |
| public static final int | |
| protected String | |
| public static final int | |
| public static final int | |
| protected int | |
| public static final int | |
| public static final int | |
| protected boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static Response | Returns: the synthetic Response objectthe exception ex)Return a Response object that looks like a BYE protocol response. |
| public Exception | |
| public String | Returns: the rest of the responseReturn the rest of the response as a string, usually used to return the arbitrary message text after a NO response. |
| public String | |
| public int | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | Returns: true if the character is foundthe character to look for c)Skip past any spaces. |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| private void | |
| private Object | parseString(boolean parseAtoms, boolean returnString)
Generic parsing routine that can parse out a Quoted-String, Literal or Atom and return the parsed token as a String or a ByteArray. |
| public byte | |
| public String | |
| public String | Returns: a StringExtract an ASTRING, starting at the current position and return as a String. |
| public String[] | |
| public byte | |
| public ByteArray | |
| public ByteArrayInputStream | |
| private String | readDelimString(String delim)
Extract a string stopping at control characters or any character in delim. |
| public long | |
| public int | |
| public String | Returns: the stringthe delimiter character delim)Read a string as an arbitrary sequence of characters, stopping at the delimiter Used to read part of a response code inside []. |
| public String | |
| public String[] | |
| private String[] | |
| public void | |
| public void | |
| public void | |
| public void | |
| public boolean | |
| private String | |
| public String |
| ASTRING_CHAR_DELIM | back to summary |
|---|---|
| private static String ASTRING_CHAR_DELIM An ASTRING_CHAR is any CHAR delimited by: SPACE | CTL | '(' | ')' | '{' | '%' | '*' | '"' | '\' (CTL is handled in readDelimString.) | |
| ATOM_CHAR_DELIM | back to summary |
|---|---|
| private static String ATOM_CHAR_DELIM An ATOM is any CHAR delimited by: SPACE | CTL | '(' | ')' | '{' | '%' | '*' | '"' | '\' | ']' (CTL is handled in readDelimString.) | |
| BAD | back to summary |
|---|---|
| public static final int BAD | |
| buffer | back to summary |
|---|---|
| protected byte[] buffer | |
| BYE | back to summary |
|---|---|
| public static final int BYE | |
| CONTINUATION | back to summary |
|---|---|
| public static final int CONTINUATION | |
| ex | back to summary |
|---|---|
protected Exception ex
| |
| increment | back to summary |
|---|---|
| private static final int increment | |
| index | back to summary |
|---|---|
| protected int index | |
| NO | back to summary |
|---|---|
| public static final int NO | |
| OK | back to summary |
|---|---|
| public static final int OK | |
| pindex | back to summary |
|---|---|
| protected int pindex | |
| size | back to summary |
|---|---|
| protected int size | |
| SYNTHETIC | back to summary |
|---|---|
| public static final int SYNTHETIC | |
| tag | back to summary |
|---|---|
| protected String tag | |
| TAG_MASK | back to summary |
|---|---|
| public static final int TAG_MASK | |
| TAGGED | back to summary |
|---|---|
| public static final int TAGGED | |
| type | back to summary |
|---|---|
| protected int type | |
| TYPE_MASK | back to summary |
|---|---|
| public static final int TYPE_MASK | |
| UNTAGGED | back to summary |
|---|---|
| public static final int UNTAGGED | |
| utf8 | back to summary |
|---|---|
| protected boolean utf8 | |
| Response | back to summary |
|---|---|
| public Response(String s) | |
| Response | back to summary |
|---|---|
| public Response(String s, boolean supportsUtf8) Constructor for testing.
| |
| Response | back to summary |
|---|---|
| public Response(Protocol p) throws IOException, ProtocolException Read a new Response from the given Protocol
| |
| Response | back to summary |
|---|---|
| public Response(Response r) Copy constructor.
| |
| byeResponse | back to summary |
|---|---|
| public static Response byeResponse(Exception ex) Return a Response object that looks like a BYE protocol response. Include the details of the exception in the response string. | |
| getException | back to summary |
|---|---|
| public Exception getException() Return the exception for a synthetic BYE response.
| |
| getRest | back to summary |
|---|---|
| public String getRest() Return the rest of the response as a string, usually used to return the arbitrary message text after a NO response.
| |
| getTag | back to summary |
|---|---|
| public String getTag() Return the tag, if this is a tagged statement.
| |
| getType | back to summary |
|---|---|
| public int getType() | |
| isBAD | back to summary |
|---|---|
| public boolean isBAD() | |
| isBYE | back to summary |
|---|---|
| public boolean isBYE() | |
| isContinuation | back to summary |
|---|---|
| public boolean isContinuation() | |
| isNextNonSpace | back to summary |
|---|---|
| public boolean isNextNonSpace(char c) Skip past any spaces. If the next non-space character is c, consume it and return true. Otherwise stop at that point and return false.
| |
| isNO | back to summary |
|---|---|
| public boolean isNO() | |
| isOK | back to summary |
|---|---|
| public boolean isOK() | |
| isSynthetic | back to summary |
|---|---|
| public boolean isSynthetic() | |
| isTagged | back to summary |
|---|---|
| public boolean isTagged() | |
| isUnTagged | back to summary |
|---|---|
| public boolean isUnTagged() | |
| parse | back to summary |
|---|---|
| private void parse() | |
| parseString | back to summary |
|---|---|
| private Object parseString(boolean parseAtoms, boolean returnString) Generic parsing routine that can parse out a Quoted-String, Literal or Atom and return the parsed token as a String or a ByteArray. Errors or NIL data will return null. | |
| peekByte | back to summary |
|---|---|
| public byte peekByte() | |
| readAtom | back to summary |
|---|---|
| public String readAtom() Extract an ATOM, starting at the current position. Updates the internal index to beyond the Atom.
| |
| readAtomString | back to summary |
|---|---|
| public String readAtomString() Extract an ASTRING, starting at the current position and return as a String. An ASTRING can be a QuotedString, a Literal or an Atom (plus ']'). Any errors in parsing returns null ASTRING := QuotedString | Literal | 1*ASTRING_CHAR
| |
| readAtomStringList | back to summary |
|---|---|
| public String[] readAtomStringList() | |
| readByte | back to summary |
|---|---|
| public byte readByte() Return the next byte from this Statement.
| |
| readByteArray | back to summary |
|---|---|
| public ByteArray readByteArray() Extract a NSTRING, starting at the current position. Return it as a ByteArray. The sequence 'NIL' is returned as null NSTRING := QuotedString | Literal | "NIL"
| |
| readBytes | back to summary |
|---|---|
| public ByteArrayInputStream readBytes() Extract a NSTRING, starting at the current position. Return it as a ByteArrayInputStream. The sequence 'NIL' is returned as null NSTRING := QuotedString | Literal | "NIL"
| |
| readDelimString | back to summary |
|---|---|
| private String readDelimString(String delim) Extract a string stopping at control characters or any character in delim. | |
| readLong | back to summary |
|---|---|
| public long readLong() Extract a long number, starting at the current position. Updates the internal index to beyond the number. Returns -1 if a long number was not found.
| |
| readNumber | back to summary |
|---|---|
| public int readNumber() Extract an integer, starting at the current position. Updates the internal index to beyond the number. Returns -1 if a number was not found.
| |
| readString | back to summary |
|---|---|
| public String readString(char delim) Read a string as an arbitrary sequence of characters, stopping at the delimiter Used to read part of a response code inside [].
| |
| readString | back to summary |
|---|---|
| public String readString() Extract a NSTRING, starting at the current position. Return it as a String. The sequence 'NIL' is returned as null NSTRING := QuotedString | Literal | "NIL"
| |
| readStringList | back to summary |
|---|---|
| public String[] readStringList() | |
| readStringList | back to summary |
|---|---|
| private String[] readStringList(boolean atom) | |
| reset | back to summary |
|---|---|
| public void reset() Reset pointer to beginning of response. | |
| skip | back to summary |
|---|---|
| public void skip(int count) | |
| skipSpaces | back to summary |
|---|---|
| public void skipSpaces() | |
| skipToken | back to summary |
|---|---|
| public void skipToken() Skip to the next space, for use in error recovery while parsing. | |
| supportsUtf8 | back to summary |
|---|---|
| public boolean supportsUtf8() Does the server support UTF-8?
| |
| toString | back to summary |
|---|---|
| private String toString(byte[] buffer, int start, int end) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |