src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java
changeset 54147 8f91e1a7ebdc
parent 53720 3e451bff6f7f
child 57981 c4ec55644b4b
equal deleted inserted replaced
54146:81605c74b980 54147:8f91e1a7ebdc
    41  * The typical life-cycle of a HttpExchange is shown in the sequence
    41  * The typical life-cycle of a HttpExchange is shown in the sequence
    42  * below.
    42  * below.
    43  * <ol><li>{@link #getRequestMethod()} to determine the command
    43  * <ol><li>{@link #getRequestMethod()} to determine the command
    44  * <li>{@link #getRequestHeaders()} to examine the request headers (if needed)
    44  * <li>{@link #getRequestHeaders()} to examine the request headers (if needed)
    45  * <li>{@link #getRequestBody()} returns a {@link java.io.InputStream} for reading the request body.
    45  * <li>{@link #getRequestBody()} returns a {@link java.io.InputStream} for reading the request body.
    46  *     After reading the request body, the stream is close.
    46  *     After reading the request body, the stream should be closed.
    47  * <li>{@link #getResponseHeaders()} to set any response headers, except content-length
    47  * <li>{@link #getResponseHeaders()} to set any response headers, except content-length
    48  * <li>{@link #sendResponseHeaders(int,long)} to send the response headers. Must be called before
    48  * <li>{@link #sendResponseHeaders(int,long)} to send the response headers. Must be called before
    49  * next step.
    49  * next step.
    50  * <li>{@link #getResponseBody()} to get a {@link java.io.OutputStream} to send the response body.
    50  * <li>{@link #getResponseBody()} to get a {@link java.io.OutputStream} to send the response body.
    51  *      When the response body has been written, the stream must be closed to terminate the exchange.
    51  *      When the response body has been written, the stream must be closed to terminate the exchange.