home *** CD-ROM | disk | FTP | other *** search
/ Java Developer's Companion / Java Developer's Companion.iso / binaries / Windows / jsdk / src / javax / servlet / ServletResponse.java < prev    next >
Encoding:
Java Source  |  1997-07-18  |  2.1 KB  |  67 lines

  1. /*
  2.  * @(#)ServletResponse.java    1.18 97/05/22
  3.  * 
  4.  * Copyright (c) 1995-1997 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  * CopyrightVersion 1.0
  20.  */
  21.  
  22. package javax.servlet;
  23.  
  24. import java.io.IOException;
  25. import java.io.InputStream;
  26.  
  27. /**
  28.  * Interface for sending a MIME datum from the servlet's service method
  29.  * to the client.  Network service developers implement this interface;
  30.  * its methods are then used by servlets when the service method is
  31.  * run, to return data to clients.  The ServletResponse object is passed
  32.  * as an argument to the service method..
  33.  *
  34.  * @version    1.18, 05/22/97
  35.  * @author David Connelly */
  36.  
  37. public
  38. interface ServletResponse {
  39.     /**
  40.      * Sets the content length for this response.
  41.      *
  42.      * @param len the content length
  43.      */
  44.     public void setContentLength(int len);
  45.  
  46.     /**
  47.      * Sets the content type for this response.
  48.      *
  49.      * @param type the content's MIME type
  50.      */
  51.     public void setContentType(String type);
  52.  
  53.     /**
  54.      * Returns an output stream for writing response data.
  55.      * @exception IOException if an I/O exception has occurred
  56.      */
  57.     public ServletOutputStream getOutputStream() throws IOException;
  58.  
  59.     /**
  60.      * Sets the content of this reply to the specified input stream.
  61.      * The server will then send the contents of this input stream
  62.      * back to the client when the servlet has finished.
  63.      * @param in the input stream to read the content from
  64.      */
  65.     // public void setContent(InputStream in);
  66. }
  67.