|
TopoWeb Commons API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.topoweb.net.server.DoubleNewLineDetector
Detects if there are two consecutive new lines in the Session
bytes read in. New lines are interpreted to be either of
the byte strings '\r\n\', or '\n'. This captures
the delineation of an HTTP request header (in that case, the '\n\n'
check is redundant)
Constructor Summary | |
DoubleNewLineDetector()
|
Method Summary | |
boolean |
requestCompleted(Session session)
Tests whether enough bytes have been read into the given session to form a request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DoubleNewLineDetector()
Method Detail |
public boolean requestCompleted(Session session)
RequestBoundaryDetector
session
to form a request.
requestCompleted
in interface RequestBoundaryDetector
session
- the Session
inspected
true
, if there are enough
bytes in the given session
to form an interpretable request;
false
, o.w.Session.getReadArray()
,
Session.getReadAmount()
|
TopoWeb Commons API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |