String line = getLine(bin); requestLine = new RequestLine(line); headers = new Vector(); line = getLine(bin); while (line.length() > 0) { if (line.length() > 0) { Header header = new Header(line); headers.addElement(header); line = getLine(bin); } }
Header header = null; for (int i = 0; i < headers.size(); i++) { Header tmpHeader = (Header) headers.elementAt(i); if (tmpHeader.type == type) { header = tmpHeader; break; } } return header;
return requestLine;