org.red5.server.net.servlet
public class ServletUtils extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BUFFER_SIZE
Default value is 2048.
|
Constructor and Description |
---|
ServletUtils() |
Modifier and Type | Method and Description |
---|---|
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.
|
public static final int DEFAULT_BUFFER_SIZE
public static void copy(InputStream input, OutputStream output) throws IOException
input
- inputoutput
- outputIOException
- on errorpublic static void copy(InputStream input, OutputStream output, int bufferSize) throws IOException
input
- inputbufferSize
- buffer sizeoutput
- outputIOException
- on errorpublic static void copyThenClose(InputStream input, OutputStream output) throws IOException
output
- outputinput
- inputIOException
- on errorpublic static byte[] getBytes(InputStream input) throws IOException
input
- input streamIOException
- on errorCopyright © 2006-2012 The Red5 Project