Code example for URL

Methods: toString

0
	private boolean outputStreamClosed;
 
	public ContentURLConnection(ContentResolver resolver, URL url) {
		super(url);
		this.resolver = resolver;
		String spec = url.toString();
		uri = Uri.parse(spec);
	} 
 
	/** 
	 * {@inheritDoc} 
	 */ 
	@Override 
	public void connect() throws IOException { 
		if (getDoInput()) {
			InputStream in = this.resolver.openInputStream(uri);
			this.inputStream = new ContentURLConnectionInputStream(in);
		} 
		if (getDoOutput()) {
			OutputStream out = this.resolver.openOutputStream(uri, "rwt");
			this.outputStream = new ContentURLConnectionOutputStream(out);