Response { public String readAtomString() { return (String)parseString(true, true); } Response(String s);  Response(Protocol p);  Response(Response r); static Response byeResponse(Exception ex); void skipSpaces(); void skipToken(); void skip(int count); byte peekByte(); byte readByte(); String readAtom(); String readString(char delim); String[] readStringList(); String[] readAtomStringList(); int readNumber(); long readLong(); String readString(); ByteArrayInputStream readBytes(); ByteArray readByteArray(); String readAtomString(); int getType(); boolean isContinuation(); boolean isTagged(); boolean isUnTagged(); boolean isOK(); boolean isNO(); boolean isBAD(); boolean isBYE(); boolean isSynthetic(); String getTag(); String getRest(); void reset(); String toString(); final static int TAG_MASK; final static int CONTINUATION; final static int TAGGED; final static int UNTAGGED; final static int TYPE_MASK; final static int OK; final static int NO; final static int BAD; final static int BYE; final static int SYNTHETIC; }
@Test public void testAString() throws Exception { for (String s : astringTests) { Response r = new Response("* " + s); assertEquals("atom", r.readAtomString()); } for (String s : astringTests) { Response r = new Response("* " + s + " "); assertEquals("atom", r.readAtomString()); } }
@Test public void testAStringSpecial() throws Exception { Response r = new Response("* " + "atom] "); assertEquals("atom]", r.readAtomString()); }