home *** CD-ROM | disk | FTP | other *** search
Java Source | 1997-07-18 | 2.1 KB | 67 lines |
- /*
- * @(#)ServletResponse.java 1.18 97/05/22
- *
- * Copyright (c) 1995-1997 Sun Microsystems, Inc. All Rights Reserved.
- *
- * This software is the confidential and proprietary information of Sun
- * Microsystems, Inc. ("Confidential Information"). You shall not
- * disclose such Confidential Information and shall use it only in
- * accordance with the terms of the license agreement you entered into
- * with Sun.
- *
- * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
- * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
- * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
- * THIS SOFTWARE OR ITS DERIVATIVES.
- *
- * CopyrightVersion 1.0
- */
-
- package javax.servlet;
-
- import java.io.IOException;
- import java.io.InputStream;
-
- /**
- * Interface for sending a MIME datum from the servlet's service method
- * to the client. Network service developers implement this interface;
- * its methods are then used by servlets when the service method is
- * run, to return data to clients. The ServletResponse object is passed
- * as an argument to the service method..
- *
- * @version 1.18, 05/22/97
- * @author David Connelly */
-
- public
- interface ServletResponse {
- /**
- * Sets the content length for this response.
- *
- * @param len the content length
- */
- public void setContentLength(int len);
-
- /**
- * Sets the content type for this response.
- *
- * @param type the content's MIME type
- */
- public void setContentType(String type);
-
- /**
- * Returns an output stream for writing response data.
- * @exception IOException if an I/O exception has occurred
- */
- public ServletOutputStream getOutputStream() throws IOException;
-
- /**
- * Sets the content of this reply to the specified input stream.
- * The server will then send the contents of this input stream
- * back to the client when the servlet has finished.
- * @param in the input stream to read the content from
- */
- // public void setContent(InputStream in);
- }
-