Package org.red5.server.net.servlet
Class ServletUtils
java.lang.Object
org.red5.server.net.servlet.ServletUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopy(InputStream input, OutputStream output) Copies information from the input stream to the output stream using a default buffer size of 2048 bytes.static voidcopy(InputStream input, OutputStream output, int bufferSize) Copies information from the input stream to the output stream using the specified buffer sizestatic voidcopy(javax.servlet.http.HttpServletRequest req, OutputStream output) Copies information from the http request to the output stream using the specified content length.static voidcopyThenClose(InputStream input, OutputStream output) Copies information between specified streams and then closes both of the streams.static byte[]getBytes(InputStream input) getRemoteAddresses(javax.servlet.http.HttpServletRequest request) Return all remote addresses that were involved in the passed request.
-
Field Details
-
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZEDefault value is 2048.- See Also:
-
-
Constructor Details
-
ServletUtils
public ServletUtils()
-
-
Method Details
-
copy
Copies information from the input stream to the output stream using a default buffer size of 2048 bytes.- Parameters:
input- inputoutput- output- Throws:
IOException- on error
-
copy
Copies information from the input stream to the output stream using the specified buffer size- Parameters:
input- inputoutput- outputbufferSize- buffer size- Throws:
IOException- on error
-
copy
public static void copy(javax.servlet.http.HttpServletRequest req, OutputStream output) throws IOException Copies information from the http request to the output stream using the specified content length.- Parameters:
req- Requestoutput- Output stream- Throws:
IOException- on error
-
copyThenClose
Copies information between specified streams and then closes both of the streams.- Parameters:
input- inputoutput- output- Throws:
IOException- on error
-
getBytes
- Parameters:
input- input stream- Returns:
- a byte[] containing the information contained in the specified InputStream.
- Throws:
IOException- on error
-
getRemoteAddresses
Return all remote addresses that were involved in the passed request.- Parameters:
request- request- Returns:
- remote addresses
-