public HttpURLConnection getConnection(String url) throws IOException,
			OAuthMessageSignerException, OAuthExpectationFailedException,
			OAuthCommunicationException {
		try {
			URL u = new URL(url);

			HttpURLConnection uc = (HttpURLConnection) u.openConnection();

			if (consumer != null) {
				try {
					System.out.println("Signing the oAuth consumer");
					consumer.sign(uc);

				} catch (OAuthMessageSignerException e) {
					throw e;

				} catch (OAuthExpectationFailedException e) {
					throw e;

				} catch (OAuthCommunicationException e) {
					throw e;
				}
				uc.connect();
			}
			return uc;
		} catch (IOException e) {
			throw e;
		}
	}