## javax.servlet.http
Interface WebConnection

    public interface WebConnection

This interface encapsulates the connection for an upgrade request. It allows the protocol handler to sent service requests and status queries to the container.

Since:
  Servlet 3.1

Method Summary
`ServletInputStream` `getInputStream()` Returns an input stream for this web connection.
`ServletOutputStream` `getOutputStream()` Returns an output stream for this web connection.
`boolean` `isInputShutdown()` Returns whether the read-half of the web connection is closed.
`boolean` `isOutputShutdown()` Returns whether the write-half of the web connection is closed.
`void` `shutdownInput()` Places the input stream for this web connection at "end of stream".
`void` `shutdownOutput()` Disables the output stream for this web connection.

Method Detail

### getInputStream

    ServletInputStream getInputStream()
                                      throws java.io.IOException

  Returns an input stream for this web connection.

  Returns:
    a ServletInputStream for reading binary data
  Throws:
    `java.io.IOException` - if an I/O error occurs

### getOutputStream

    ServletOutputStream getOutputStream()
                                        throws java.io.IOException

  Returns an output stream for this web connection.

  Returns:
    a ServletOutputStream for writing binary data
  Throws:
    `java.io.IOException` - if an I/O error occurs

### shutdownInput

    void shutdownInput()
                       throws java.io.IOException

  Places the input stream for this web connection at "end of stream". Any data sent to the input stream side of the web connection is silently discarded. Reading from a web connection input stream after invoking shutdownInput() on the web connection returns an EOF.

  Throws:
    `java.io.IOException` - if an I/O error occurs when shutting down the input stream.
  See Also:
    `isInputShutdown()`

### shutdownOutput

    void shutdownOutput()
                        throws java.io.IOException

  Disables the output stream for this web connection. Any previously written data will be sent. Writing to a web connection out stream after invoking shutdownOuput() on the web connection causes an IOException to be thrown.

  Throws:
    `java.io.IOException` - if an I/O error occurs when shutting down the output stream.
  See Also:
    `isOutputShutdown()`

### isInputShutdown

    boolean isInputShutdown()

  Returns whether the read-half of the web connection is closed.

  Returns:
    true if the input of the web connection has been shutdown
  See Also:
    `shutdownInput()`

### isOutputShutdown

    boolean isOutputShutdown()

  Returns whether the write-half of the web connection is closed.

  Returns:
    true if the output of the web connection has been shutdown
  See Also:
    `shutdownOutput()`

Copyright © 2012 GlassFish Community. All Rights Reserved.