|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.ws.commons.tcpmon.core.filter.StreamUtil
public class StreamUtil
Class containing utility methods to work with streams.
Method Summary | |
---|---|
static String |
getAsciiString(Stream stream,
int begin,
int end)
Convert a part of a stream to a string, using the ASCII charset encoding. |
static void |
insertAsciiString(Stream stream,
String s)
|
static void |
insertInt(Stream stream,
int i)
Insert an integer in little endian byte order. |
static void |
insertShort(Stream stream,
int s)
Insert a short integer in little endian byte order. |
static int |
readUShort(Stream stream)
Reads unsigned short in little endian byte order. |
static int |
search(Stream stream,
byte[][] patterns)
Search the stream for occurrences of given patterns. |
static int |
searchEndOfLine(Stream stream)
Search the available data in the stream for the first occurrence of the end of line sequence (\r\n). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int searchEndOfLine(Stream stream)
stream
- the stream to search in
public static String getAsciiString(Stream stream, int begin, int end)
public static void insertAsciiString(Stream stream, String s)
public static int search(Stream stream, byte[][] patterns)
stream
- the stream to searchpatterns
- the patterns to search for
public static int readUShort(Stream stream)
stream
-
public static void insertInt(Stream stream, int i)
stream
- i
- public static void insertShort(Stream stream, int s)
stream
- s
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |