class URLConnection extends java.net.URLConnection {

    @Override
	public OutputStream getOutputStream() throws IOException {
        connect();
		if (getDoOutput()) {
			OutputStream os = new FileOutputStream(this.file);
			if (getUseCaches()) {
				os = new BufferedOutputStream(os);
			}
			return os;
		}
		throw new UnknownServiceException(Locale.getString("E1")); //$NON-NLS-1$
    }

    protected  URLConnection(URL url);

}