public class HttpBinaryServlet
extends javax.servlet.http.HttpServlet
Send Disk Binary File To HttpServletResponse OutputStream
Constructor and Description |
---|
HttpBinaryServlet() |
Modifier and Type | Method and Description |
---|---|
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Send disk binary file held in a Product to HttpServletResponse OutputStream
|
void |
init()
Initialize Servlet Parameters
Take Database Driver, Conenction URL and User from /WEB-INF/web.xml.
|
static long |
pipe(java.io.InputStream in,
java.io.OutputStream out,
int chunkSize) |
public static long pipe(java.io.InputStream in, java.io.OutputStream out, int chunkSize) throws java.io.IOException
java.io.IOException
public void init() throws javax.servlet.ServletException
Initialize Servlet Parameters
Take Database Driver, Conenction URL and User from /WEB-INF/web.xml.init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
javax.servlet.UnavailableException
- If jdbcDriverClassName parameter is not found
and driver property at hipergate.cnf is not found or if jdbcURL parameter
is not found and dburl property at hipergate.cnf is not found.Environment
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, java.io.FileNotFoundException, javax.servlet.ServletException
Send disk binary file held in a Product to HttpServletResponse OutputStream
doGet
in class javax.servlet.http.HttpServlet
id_user
- Requester User GUID.id_product
- GUID of Requested Product.id_location
- GUID of Requested ProductLocation.id_category
- (Optional) GUID from Category that contains the Product to serve.
If a Category is provided then the User permissions over that Category are checked
before serving the file.java.io.IOException
java.io.FileNotFoundException
javax.servlet.ServletException
ACLUser
,
Product
,
Category