|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.officefloor.plugin.socket.server.http.parse.UsAsciiUtil
public class UsAsciiUtil
Utility methods to help in US-ASCII testing.
| Field Summary | |
|---|---|
static Charset |
US_ASCII
US-ASCII Charset. |
| Method Summary | |
|---|---|
static void |
assertEquals(String expected,
byte[] actual)
Asserts the US-ASCII content matches the expected String. |
static void |
assertEquals(String message,
String expected,
byte[] actual)
Asserts the US-ASCII content matches the expected String. |
static char |
convertToChar(byte asciiChar)
Converts the input US-ASCII character to a char. |
static byte[] |
convertToHttp(byte[] ascii)
Ensures that CR characters are followed by a LF. |
static byte[] |
convertToHttp(String text)
Convenience method to convert to US-ASCII and HTTP form. |
static String |
convertToString(byte[] ascii)
Converts the input US-ASCII to String. |
static byte |
convertToUsAscii(char character)
Converts the input character into US-ASCII character. |
static byte[] |
convertToUsAscii(String text)
Converts the input text into US-ASCII format. |
static org.easymock.ArgumentsMatcher |
createUsAsciiMatcher()
Creates a ArgumentsMatcher for method with only one parameter
being US-ASCII characters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Charset US_ASCII
Charset.
| Method Detail |
|---|
public static void assertEquals(String message,
String expected,
byte[] actual)
message - Message.expected - Expected text.actual - Actual US-ASCII text.
public static void assertEquals(String expected,
byte[] actual)
expected - Expected text.actual - Actual US-ASCII text.public static byte[] convertToUsAscii(String text)
text - Text.
public static byte[] convertToHttp(String text)
text - Text.
public static byte[] convertToHttp(byte[] ascii)
ascii - Ascii content.
public static String convertToString(byte[] ascii)
ascii - US-ASCII.
public static char convertToChar(byte asciiChar)
asciiChar - US-ASCII character.
public static byte convertToUsAscii(char character)
character - Character.
public static org.easymock.ArgumentsMatcher createUsAsciiMatcher()
ArgumentsMatcher for method with only one parameter
being US-ASCII characters.
ArgumentsMatcher.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||