org.red5.server.net.servlet
Class ServletUtils

java.lang.Object
  extended by 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 -
output -
Throws:
IOException

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 -
bufferSize -
output -
Throws:
IOException

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 -
input -
Throws:
IOException

getBytes

public static byte[] getBytes(InputStream input)
                       throws IOException
Parameters:
input -
Returns:
Throws:
IOException

getRemoteAddresses

public static List<String> getRemoteAddresses(javax.servlet.http.HttpServletRequest request)
Return all remote addresses that were involved in the passed request.

Parameters:
request -
Returns:


Copyright © 2006-2007 the Red5 project.