void writeRequest(OutputStream out) throws IOException {
        DataOutputStream data = new DataOutputStream(new BufferedOutputStream(out));
        if ((doOutput) && (output == null)) {
            throw new IOException(Messages.getString("HttpsURLConnection.noPOSTData")); //$NON-NLS-1$
        }
        if (ifModifiedSince != 0) {
            Date date = new Date(ifModifiedSince);
            SimpleDateFormat formatter = new SimpleDateFormat("EEE, d MMM yyyy hh:mm:ss z"); //$NON-NLS-1$
            formatter.setTimeZone(TimeZone.getTimeZone("GMT")); //$NON-NLS-1$
            setRequestProperty("If-Modified-Since", formatter.format(date)); //$NON-NLS-1$
        }
        if (doOutput) {
            setRequestProperty("Content-length", "" + output.size()); //$NON-NLS-1$ //$NON-NLS-2$
        }

        data.writeBytes((doOutput ? "POST" : "GET") + " " + (url.getFile().equals("") ? "/" : url.getFile()) + " HTTP/1.0\r\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$

        for (int i = 0; i < requestKeys.size(); ++i) {
            String key = (String) requestKeys.elementAt(i);
            if (!key.startsWith("Proxy-")) { //$NON-NLS-1$
                data.writeBytes(key + ": " + requestValues.elementAt(i) + "\r\n"); //$NON-NLS-1$ //$NON-NLS-2$
            }
        }
        data.writeBytes("\r\n"); //$NON-NLS-1$
        data.flush();
        if (doOutput) {
            output.writeTo(out);
        }
        out.flush();
    }