code: @Override
      public OutputStream getOutputStream() throws IOException {
  
  	URLConnection connection = url.openConnection();
  	if (connection == null) return null;
  
  	connection.setDoOutput(true); // is it necessary?
  	return connection.getOutputStream();
      }
docs: Returns an OutputStream obtained from the data source