All Downloads are FREE. Search and download functionalities are using the official Maven repository.

aQute.libg.shacache.ShaSource Maven / Gradle / Ivy

There is a newer version: 7.0.0
Show newest version
package aQute.libg.shacache;

import java.io.InputStream;

/**
 * An object that can retrieve an inputstream on a given SHA-1
 */
public interface ShaSource {
	/**
	 * Retrieving the stream is fast so do not cache
	 * 
	 * @return true if a fast retrieval can be done
	 */
	boolean isFast();

	/**
	 * Get an inputstream based on the given SHA-1
	 * 
	 * @param sha the SHA-1
	 * @return a stream or null if not found
	 */
	InputStream get(String sha) throws Exception;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy