throw new IOException("Invalid request line reading from the InputStream");
throw new IOException("Invalid request line reading from the InputStream '"+line+"'");
    public void read(InputStream is) throws IOException {        this.is = is;        String line = readLine(is);        String[] parts = line.split(" ");        if (parts.length == 0) {            System.err.println("Empty request!");        } else if (parts.length == 2 || parts.length == 3) {            setMethod(parts[0]);            if (getMethod().equalsIgnoreCase("CONNECT")) {                setURL("https://" + parts[1] + "/");            } else {                setURL(parts[1]);            }        } else {            throw new IOException("Invalid request line reading from the InputStream");        }        if (parts.length == 3) {            setVersion(parts[2]);        } else {            setVersion("HTTP/0.9");        }        super.read(is);        if (method.equals("CONNECT") || method.equals("GET") || method.equals("HEAD")) {            // These methods cannot include a body            setContentStream(null);            setContent(null);        }    }