// Path: android-reader/src/main/java/net/vhati/openuhs/androidreader/downloader/FetchUnitException.java
// public class FetchUnitException extends Exception {
// 
// 
//     public FetchUnitException() {
// 	}
// 
// 	public FetchUnitException( String message ) {
// 		super(message);
// 	}
// 
// 	public FetchUnitException( Throwable cause ) {
// 		super( cause );
// 	}
// 
// 	public FetchUnitException( String message, Throwable cause ) {
// 		super( message, cause );
// 	}
// }


import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import android.os.AsyncTask;
import net.vhati.openuhs.androidreader.downloader.FetchUnitException;
		return userAgent;
	}

	public void setEncoding( String s ) {
		this.encoding = s;
	}

	public String getEncoding() {
		return encoding;
	}


	// This runs in a background thread, unlike the other methods here.
	@Override
	protected StringFetchResult doInBackground( String... urlStrings ) {
		HttpURLConnection con = null;
		InputStream downloadStream = null;
		BufferedReader r = null;
		StringBuilder contentString = null;

		String urlString = urlStrings[0];
		StringFetchResult fetchResult = new StringFetchResult( urlString );
		Exception ex = null;

		try {
			con = (HttpURLConnection)(new URL( urlString ).openConnection());
			con.setRequestProperty( "User-Agent", userAgent );
			con.connect();

			if ( con.getResponseCode() != HttpURLConnection.HTTP_OK ) {
// Path: android-reader/src/main/java/net/vhati/openuhs/androidreader/downloader/FetchUnitException.java
// public class FetchUnitException extends Exception {
// 
// 
//     public FetchUnitException() {
// 	}
// 
// 	public FetchUnitException( String message ) {
// 		super(message);
// 	}
// 
// 	public FetchUnitException( Throwable cause ) {
// 		super( cause );
// 	}
// 
// 	public FetchUnitException( String message, Throwable cause ) {
// 		super( message, cause );
// 	}
// }


// Path: android-reader/src/main/java/net/vhati/openuhs/androidreader/downloader/StringFetchTask.java
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import android.os.AsyncTask;
import net.vhati.openuhs.androidreader.downloader.FetchUnitException;

		return userAgent;
	}

	public void setEncoding( String s ) {
		this.encoding = s;
	}

	public String getEncoding() {
		return encoding;
	}


	// This runs in a background thread, unlike the other methods here.
	@Override
	protected StringFetchResult doInBackground( String... urlStrings ) {
		HttpURLConnection con = null;
		InputStream downloadStream = null;
		BufferedReader r = null;
		StringBuilder contentString = null;

		String urlString = urlStrings[0];
		StringFetchResult fetchResult = new StringFetchResult( urlString );
		Exception ex = null;

		try {
			con = (HttpURLConnection)(new URL( urlString ).openConnection());
			con.setRequestProperty( "User-Agent", userAgent );
			con.connect();

			if ( con.getResponseCode() != HttpURLConnection.HTTP_OK ) {
				throw new FetchUnitException( "Server returned HTTP "+ con.getResponseCode() +" "+ con.getResponseMessage() );