Holger's Java API

## com.antelmann.servlet
Class TextImageServlet

    java.lang.Object
      javax.servlet.GenericServlet
          javax.servlet.http.HttpServlet
              com.antelmann.servlet.TextImageServlet

All Implemented Interfaces:
  Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class TextImageServlet

extends javax.servlet.http.HttpServlet

generates a text image based on parameters

Author:
  Holger Antelmann
See Also:
  `doGet(HttpServletRequest, HttpServletResponse)`, Serialized Form

Constructor Summary
`TextImageServlet()`

Method Summary
`protected void` `doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` generates an image based on the parameters text, font, foreground, background.
`protected void` `doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)`
`static Map<String,String>` `generateColorMap()`
`protected BufferedImage` `generateImage(String text, String font, String foreground, String background, boolean antiAlias)`
`static String` `generateQueryString(javax.servlet.http.HttpServletRequest request)` generates the query part that is to follow the '?'
`static String` `generateQueryString(String text, Font font, Color foreground, Color background, boolean antiAlias)` generates the query part that is to follow the '?'
`static String[]` `getFontFamilies()`

Methods inherited from class javax.servlet.http.HttpServlet
`doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service`

Methods inherited from class javax.servlet.GenericServlet
`destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TextImageServlet

    public TextImageServlet()

Method Detail

### generateImage

    protected BufferedImage generateImage(String text,
                                          String font,
                                          String foreground,
                                          String background,
                                          boolean antiAlias)

### generateColorMap

    public static Map<String,String> generateColorMap()

### getFontFamilies

    public static String[] getFontFamilies()

### generateQueryString

    public static String generateQueryString(String text,
                                             Font font,
                                             Color foreground,
                                             Color background,
                                             boolean antiAlias)

  generates the query part that is to follow the '?'

### generateQueryString

    public static String generateQueryString(javax.servlet.http.HttpServletRequest request)

  generates the query part that is to follow the '?'

### doPost

    protected void doPost(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
                   throws javax.servlet.ServletException,
                          IOException

  Overrides:
    `doPost` in class `javax.servlet.http.HttpServlet`
  Throws:
    `javax.servlet.ServletException`
    `IOException`

### doGet

    protected void doGet(javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
                  throws javax.servlet.ServletException,
                         IOException

  generates an image based on the parameters text, font, foreground, background. An alternative to provide the font parameter is to provide fontFamily, fontType and fontSize.

  Overrides:
    `doGet` in class `javax.servlet.http.HttpServlet`
  Throws:
    `javax.servlet.ServletException`
    `IOException`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads