org.fedoracommons.funapi
Class UnapiServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.fedoracommons.funapi.UnapiServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class UnapiServlet
- extends javax.servlet.http.HttpServlet
An implementation of the unAPI version 1 HTTP interface functions.
- Since:
- 0.1
- Version:
- $Id: UnapiServlet.java 33 2008-10-25 19:31:36Z pangloss $
- Author:
- Edwin Shin
- See Also:
- unAPI Specs,
Serialized Form
Method Summary |
static boolean |
copy(java.io.InputStream source,
java.io.OutputStream destination)
Copy an InputStream to an OutputStream. |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
init()
|
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnapiServlet
public UnapiServlet()
init
public void init()
throws javax.servlet.ServletException
- Overrides:
init
in class javax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
doGet
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- Overrides:
doGet
in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
java.io.IOException
copy
public static boolean copy(java.io.InputStream source,
java.io.OutputStream destination)
- Copy an InputStream to an OutputStream.
While this method will automatically close the destination OutputStream,
the caller is responsible for closing the source InputStream.
- Parameters:
source
- destination
-
- Returns:
true
if the operation was successful;
false
otherwise (which includes a null input).- See Also:
-
http://java.sun.com/docs/books/performance/1st_edition/html/JPIOPerformance.fm.html#22980
Copyright © 2008 Fedora Commons, Inc.. All Rights Reserved.