Package com.twelvemonkeys.servlet.image
Class ColorServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- com.twelvemonkeys.servlet.GenericServlet
-
- com.twelvemonkeys.servlet.image.ColorServlet
-
- All Implemented Interfaces:
java.io.Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class ColorServlet extends GenericServlet
Creates a minimal 1 x 1 pixel PNG image, in a color specified by the"color"
parameter. The color is HTML-style #RRGGBB, with two digits hex number for red, green and blue (the hash, '#', is optional).The class does only byte manipulation, there is no server-side image processing involving AWT (
Toolkit
class) of any kind.- Version:
- $Id: ColorServlet.java#2 $
- Author:
- Harald Kuhr, last modified by $Author: haku $
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ColorServlet()
Creates a ColorDroplet.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
service(javax.servlet.ServletRequest pRequest, javax.servlet.ServletResponse pResponse)
Renders the 1 x 1 single color PNG to the response.-
Methods inherited from class com.twelvemonkeys.servlet.GenericServlet
init
-
-
-
-
Method Detail
-
service
public void service(javax.servlet.ServletRequest pRequest, javax.servlet.ServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
Renders the 1 x 1 single color PNG to the response.- Specified by:
service
in interfacejavax.servlet.Servlet
- Specified by:
service
in classjavax.servlet.GenericServlet
- Parameters:
pRequest
- the requestpResponse
- the response- Throws:
java.io.IOException
javax.servlet.ServletException
- See Also:
class description
-
-