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

org.openstack4j.model.common.Payload Maven / Gradle / Ivy

There is a newer version: 3.2.0
Show newest version
package org.openstack4j.model.common;

import java.io.Closeable;
import java.io.InputStream;

/**
 * Payload holds a reference to a Payload Object whether it be a file, inputstream or other and provides an input stream when uploading data to OpenStack.
 *
 * @param  the type of payload object
 * @author Jeremy Unruh
 */
public interface Payload extends Closeable {

	/**
	 * Opens and returns the input stream.
	 *
	 * @return the input stream
	 */
	InputStream open();
	
	/**
	 * Closes the stream and releases state.
	 */
	void closeQuietly();
	
	/**
	 * Gets the raw underlying object for the Payload.
	 *
	 * @return the raw object
	 */
	T getRaw();
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy