Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.red5.server.net.servlet
Class ServletUtils

    java.lang.Object
      org.red5.server.net.servlet.ServletUtils

    public class ServletUtils

extends Object

Field Summary
`static int` | `DEFAULT_BUFFER_SIZE` Default value is 2048.

Constructor Summary
`ServletUtils()`

Method Summary
`static void` | `copy(InputStream input, OutputStream output)` Copies information from the input stream to the output stream using a default buffer size of 2048 bytes.
`static void` | `copy(InputStream input, OutputStream output, int bufferSize)` Copies information from the input stream to the output stream using the specified buffer size
`static void` | `copyThenClose(InputStream input, OutputStream output)` Copies information between specified streams and then closes both of the streams.
`static byte[]` | `getBytes(InputStream input)`
`static List<String>` | `getRemoteAddresses(javax.servlet.http.HttpServletRequest request)` Return all remote addresses that were involved in the passed request.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_BUFFER_SIZE

    public static final int DEFAULT_BUFFER_SIZE

  Default value is 2048.

  See Also:
    Constant Field Values

Constructor Detail

### ServletUtils

    public ServletUtils()

Method Detail

### copy

    public static void copy(InputStream input,
                            OutputStream output)
                     throws IOException

  Copies information from the input stream to the output stream using a default buffer size of 2048 bytes.

  Parameters:
    `input` - input
    `output` - output
  Throws:
    `IOException` - on error

### copy

    public static void copy(InputStream input,
                            OutputStream output,
                            int bufferSize)
                     throws IOException

  Copies information from the input stream to the output stream using the specified buffer size

  Parameters:
    `input` - input
    `bufferSize` - buffer size
    `output` - output
  Throws:
    `IOException` - on error

### copyThenClose

    public static void copyThenClose(InputStream input,
                                     OutputStream output)
                              throws IOException

  Copies information between specified streams and then closes both of the streams.

  Parameters:
    `output` - output
    `input` - input
  Throws:
    `IOException` - on error

### getBytes

    public static byte[] getBytes(InputStream input)
                           throws IOException

  Parameters:
    `input` - input stream
  Returns:
    a byte[] containing the information contained in the specified InputStream.
  Throws:
    `IOException` - on error

### getRemoteAddresses

    public static List<String> getRemoteAddresses(javax.servlet.http.HttpServletRequest request)

  Return all remote addresses that were involved in the passed request.

  Parameters:
    `request` - request
  Returns:
    remote addresses

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2010 The Red5 Project