jdk/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java
changeset 30797 9cf3d0361db4
parent 30042 4728ebcf8fd0
child 34894 3248b89d1921
equal deleted inserted replaced
30796:6d090852a86a 30797:9cf3d0361db4
   171      * If the content-length response header has not already been set then
   171      * If the content-length response header has not already been set then
   172      * this is set to the appropriate value depending on the response length parameter.
   172      * this is set to the appropriate value depending on the response length parameter.
   173      * <p>
   173      * <p>
   174      * This method must be called prior to calling {@link #getResponseBody()}.
   174      * This method must be called prior to calling {@link #getResponseBody()}.
   175      * @param rCode the response code to send
   175      * @param rCode the response code to send
   176      * @param responseLength if > 0, specifies a fixed response body length
   176      * @param responseLength if {@literal > 0}, specifies a fixed response
   177      *        and that exact number of bytes must be written
   177      *        body length and that exact number of bytes must be written
   178      *        to the stream acquired from getResponseBody(), or else
   178      *        to the stream acquired from getResponseBody(), or else
   179      *        if equal to 0, then chunked encoding is used,
   179      *        if equal to 0, then chunked encoding is used,
   180      *        and an arbitrary number of bytes may be written.
   180      *        and an arbitrary number of bytes may be written.
   181      *        if <= -1, then no response body length is specified and
   181      *        if {@literal <= -1}, then no response body length is specified and
   182      *        no response body may be written.
   182      *        no response body may be written.
   183      * @see HttpExchange#getResponseBody()
   183      * @see HttpExchange#getResponseBody()
   184      */
   184      */
   185     public abstract void sendResponseHeaders (int rCode, long responseLength) throws IOException ;
   185     public abstract void sendResponseHeaders (int rCode, long responseLength) throws IOException ;
   186 
   186