DecodeServlet (ZXing 3.5.2 API)
Description: declaration: package: com.google.zxing.web, class: DecodeServlet

Package com.google.zxing.web

# Class DecodeServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
com.google.zxing.web.DecodeServlet

All Implemented Interfaces:
  `jakarta.servlet.Servlet`, `jakarta.servlet.ServletConfig`, `Serializable`

@WebServlet(value="/w/decode",loadOnStartup=1,initParams={@WebInitParam(name="maxAccessPerTime",value="120"),@WebInitParam(name="accessTimeSec",value="120"),@WebInitParam(name="maxEntries",value="100000")}) public final class DecodeServlet extends jakarta.servlet.http.HttpServlet
`HttpServlet` which decodes images containing barcodes. Given a URL, it will retrieve the image and decode it. It can also process image files uploaded via POST.

Author:
  Sean Owen
See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class jakarta.servlet.http.HttpServlet

  `LEGACY_DO_HEAD`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DecodeServlet()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `destroy()`
  `protected void`
  `doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)`
  `protected void`
  `doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)`
  `void`
  `init(jakarta.servlet.ServletConfig servletConfig)`

  ### Methods inherited from class jakarta.servlet.http.HttpServlet

  `doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service`

  ### Methods inherited from class jakarta.servlet.GenericServlet

  `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`

- ## Constructor Details

  - ### DecodeServlet

    public DecodeServlet()

- ## Method Details

  - ### init

    public void init(jakarta.servlet.ServletConfig servletConfig) throws jakarta.servlet.ServletException
    Specified by:
      `init` in interface `jakarta.servlet.Servlet`
    Overrides:
      `init` in class `jakarta.servlet.http.HttpServlet`
    Throws:
      `jakarta.servlet.ServletException`

  - ### destroy

    public void destroy()
    Specified by:
      `destroy` in interface `jakarta.servlet.Servlet`
    Overrides:
      `destroy` in class `jakarta.servlet.GenericServlet`

  - ### doGet

    protected void doGet(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException
    Overrides:
      `doGet` in class `jakarta.servlet.http.HttpServlet`
    Throws:
      `jakarta.servlet.ServletException`
      `IOException`

  - ### doPost

    protected void doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException
    Overrides:
      `doPost` in class `jakarta.servlet.http.HttpServlet`
    Throws:
      `jakarta.servlet.ServletException`
      `IOException`