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

org.frameworkset.http.StreamingHttpOutputMessage Maven / Gradle / Ivy

Go to download

bboss is a j2ee framework include aop/ioc,mvc,persistent,taglib,rpc,event ,bean-xml serializable and so on.http://www.bbossgroups.com

The newest version!
package org.frameworkset.http;

import java.io.IOException;
import java.io.OutputStream;

public interface StreamingHttpOutputMessage extends HttpOutputMessage {

	/**
	 * Set the streaming body for this message.
	 * @param body the streaming body
	 */
	void setBody(Body body);


	/**
	 * Defines the contract for bodies that can be written directly to an {@link OutputStream}.
	 * It is useful with HTTP client libraries that provide indirect access to an
	 * {@link OutputStream} via a callback mechanism.
	 */
	interface Body {

		/**
		 * Write this body to the given {@link OutputStream}.
		 * @param outputStream the output stream to write to
		 * @throws IOException in case of errors
		 */
		void writeTo(OutputStream outputStream) throws IOException;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy