001/** 002 * The contents of this file are subject to the license and copyright 003 * detailed in the LICENSE and NOTICE files at the root of the source 004 * tree. 005 * 006 */ 007package org.fcrepo.migration.foxml; 008 009import java.io.IOException; 010import java.io.InputStream; 011import java.net.URL; 012 013/** 014 * A simple abstraction around the functionality of reading 015 * content from a URL as an InputStream. Use of this interface 016 * allows for pluggable implementations and easier testing. 017 * @author mdurbin 018 */ 019public interface URLFetcher { 020 021 /** 022 * get content from a url. 023 * @param url the url 024 * @return the content 025 * @throws IOException IO exception 026 */ 027 public InputStream getContentAtUrl(URL url) throws IOException; 028}