Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 // This software is released into the Public Domain.  See copying.txt for details.
 package org.openstreetmap.osmosis.replication.v0_6.impl;
Loads and exposes the configuration properties for downloading replication history.

Brett Henderson
	private static final String KEY_BASE_URL = "baseUrl";
	private static final String KEY_MAX_INTERVAL = "maxInterval";
Creates a new instance.

configFile The configuration file to read from.
		 = new PropertiesPersister(configFile).load();

Returns the URL that change files should be downloaded from.

The download URL.
	public URL getBaseUrl() {
		String baseUrl;
		if (!baseUrl.substring(baseUrl.length() - 1).equals("/")) {
			baseUrl += "/";
		try {
			return new URL(baseUrl);
catch (MalformedURLException e) {
					"Unable to convert URL string (" + baseUrl + ") into a URL."e);

Returns the maximum interval to be downloaded in a single invocation.

The maximum download interval.
	public int getMaxInterval() {
		return Integer.parseInt(.getProperty()) * 1000;
New to GrepCode? Check out our FAQ X