String protocol;
try
{
if (l == null)
{
throw new ProtocolException(HttpMessages.requestLineIsMalformed(l).getMessage());
}
StringTokenizer st = new StringTokenizer(l, " ");
method = st.nextToken();
uri = st.nextToken();
protocol = st.nextToken();
}
catch (NoSuchElementException e)
{
throw new ProtocolException(HttpMessages.requestLineIsMalformed(l).getMessage());
}
return new RequestLine(method, uri, protocol);
}