HttpTransaction msg;
boolean res;
try {
InputStream is = new BufferedInputStream (new NioInputStream (chan));
String requestline = readLine (is);
MessageHeader mhead = new MessageHeader (is);
String clen = mhead.findValue ("Content-Length");
String trferenc = mhead.findValue ("Transfer-Encoding");
String data = null;
if (trferenc != null && trferenc.equals ("chunked"))
data = new String (readChunkedData (is));
else if (clen != null)
data = new String (readNormalData (is, Integer.parseInt (clen)));