Class DefaultWebApplicationRequest

java.lang.Object
java.io.InputStream
jakarta.servlet.ServletInputStream
cloud.piranha.webapp.impl.DefaultWebApplicationRequest
All Implemented Interfaces:
WebApplicationRequest, HttpServletRequest, ServletRequest, Closeable, AutoCloseable
Direct Known Subclasses:
EmbeddedRequest, HttpWebApplicationRequest, NanoRequest

public class DefaultWebApplicationRequest extends ServletInputStream implements WebApplicationRequest
The default WebApplicationRequest.
Author:
Manfred Riem ([email protected])
  • Field Details

    • authType

      protected String authType
      Stores the auth type.
    • asyncContext

      protected AsyncContext asyncContext
      Stores the async context.
    • asyncStarted

      protected boolean asyncStarted
      Stores if async is started.
    • asyncSupported

      protected boolean asyncSupported
      Stores if async is supported.
    • attributeManager

      protected AttributeManager attributeManager
      Stores the attribute manager.
    • characterEncoding

      protected String characterEncoding
      Stores the character encoding.
    • contentLength

      protected long contentLength
      Stores the content length.
    • contentType

      protected String contentType
      Stores the content type.
    • contextPath

      protected String contextPath
      Stores the context path.
    • cookies

      protected Cookie[] cookies
      Stores the cookies.
    • currentSessionId

      protected String currentSessionId
      Stores the current session id.
    • dispatcherType

      protected DispatcherType dispatcherType
      Stores the dispatcher type.
    • gotInputStream

      protected boolean gotInputStream
      Stores the gotInputStream flag.
    • gotReader

      protected boolean gotReader
      Stores the gotReader flag.
    • headerManager

      protected HttpHeaderManager headerManager
      Stores the header manager.
    • httpServletMapping

      protected HttpServletMapping httpServletMapping
      Stores the httpServletMapping.
    • inputStream

      protected InputStream inputStream
      Stores the input stream.
    • localAddress

      protected String localAddress
      Stores the local address.
    • localName

      protected String localName
      Stores the local name.
    • localPort

      protected int localPort
      Stores the local port.
    • method

      protected String method
      Stores the method.
    • multipartConfig

      protected MultipartConfigElement multipartConfig
      Stores the multipartConfig.
    • parameters

      protected HashMap<String,​String[]> parameters
      Stores the parameters.
    • parametersParsed

      protected boolean parametersParsed
      Stores the parameters parsed flag.
    • pathInfo

      protected String pathInfo
      Stores the path info.
    • protocol

      protected String protocol
      Stores the protocol.
    • queryString

      protected String queryString
      Stores the query string.
    • reader

      protected BufferedReader reader
      Stores the reader.
    • remoteAddr

      protected String remoteAddr
      Stores the remote address.
    • remoteHost

      protected String remoteHost
      Stores the remote host.
    • remotePort

      protected int remotePort
      Stores the remote port.
    • requestedSessionId

      protected String requestedSessionId
      Stores the requested session id.
    • requestedSessionIdFromCookie

      protected boolean requestedSessionIdFromCookie
      Stores the requested session id from cookie flag.
    • requestedSessionIdFromURL

      protected boolean requestedSessionIdFromURL
      Stores the requested session id from url flag.
    • scheme

      protected String scheme
      Stores the scheme.
    • serverName

      protected String serverName
      Stores the server name.
    • serverPort

      protected int serverPort
      Stores the server port.
    • servletPath

      protected String servletPath
      Stores the servlet path.
    • originalServletPath

      protected String originalServletPath
      Stores the original servlet path.
    • upgraded

      protected boolean upgraded
      Stores the upgraded flag.
    • upgradeHandler

      protected HttpUpgradeHandler upgradeHandler
      Stores the upgrade handler.
    • userPrincipal

      protected Principal userPrincipal
      Stores the user principal.
    • webApplication

      protected WebApplication webApplication
      Stores the web application
  • Constructor Details

    • DefaultWebApplicationRequest

      public DefaultWebApplicationRequest()
      Constructor.
  • Method Details

    • authenticate

      public boolean authenticate(HttpServletResponse response) throws IOException, ServletException
      Authenticate.
      Specified by:
      authenticate in interface HttpServletRequest
      Parameters:
      response - the HTTP servlet response.
      Returns:
      true if authenticated, false otherwise.
      Throws:
      IOException - when an I/O error occurs.
      ServletException - when a Servlet error occurs.
    • changeSessionId

      public String changeSessionId()
      Change the session id.
      Specified by:
      changeSessionId in interface HttpServletRequest
      Returns:
      the changed session id.
    • getAsyncContext

      public AsyncContext getAsyncContext()
      Returns the async context.
      Specified by:
      getAsyncContext in interface ServletRequest
      Returns:
      the async context
    • getAttribute

      public Object getAttribute(String name)
      Get the attribute.
      Specified by:
      getAttribute in interface ServletRequest
      Parameters:
      name - the attribute name.
      Returns:
      the value.
    • getAttributeNames

      public Enumeration<String> getAttributeNames()
      Get attribute names.
      Specified by:
      getAttributeNames in interface ServletRequest
      Returns:
      the attribute names.
    • getAuthType

      public String getAuthType()
      Returns the auth type.
      Specified by:
      getAuthType in interface HttpServletRequest
      Returns:
      the auth type
    • getCharacterEncoding

      public String getCharacterEncoding()
      Returns the character encoding.
      Specified by:
      getCharacterEncoding in interface ServletRequest
      Returns:
      the character encoding
    • getContentLength

      public int getContentLength()
      Returns the content length.
      Specified by:
      getContentLength in interface ServletRequest
      Returns:
      the content length
    • getContentLengthLong

      public long getContentLengthLong()
      Returns the content length.
      Specified by:
      getContentLengthLong in interface ServletRequest
      Returns:
      the content length
    • getContentType

      public String getContentType()
      Returns the content type.
      Specified by:
      getContentType in interface ServletRequest
      Returns:
      the content type
    • getContextPath

      public String getContextPath()
      Description copied from interface: HttpServletRequest
      Returns the context path.
      Specified by:
      getContextPath in interface HttpServletRequest
      Returns:
      the context path
    • getCookies

      public Cookie[] getCookies()
      Returns the cookies.
      Specified by:
      getCookies in interface HttpServletRequest
      Returns:
      the cookies
    • getDateHeader

      public long getDateHeader(String name)
      Returns the date header.
      Specified by:
      getDateHeader in interface HttpServletRequest
      Parameters:
      name - the header name.
      Returns:
      the date header
    • getDispatcherType

      public DispatcherType getDispatcherType()
      Returns the dispatcher type.
      Specified by:
      getDispatcherType in interface ServletRequest
      Returns:
      the dispatcher type
    • getHeader

      public String getHeader(String name)
      Get the header.
      Specified by:
      getHeader in interface HttpServletRequest
      Parameters:
      name - the header name.
      Returns:
      the header value.
    • getHeaderNames

      public Enumeration<String> getHeaderNames()
      Returns the header names.
      Specified by:
      getHeaderNames in interface HttpServletRequest
      Returns:
      the header names
    • getHeaders

      public Enumeration<String> getHeaders(String name)
      Get the headers.
      Specified by:
      getHeaders in interface HttpServletRequest
      Parameters:
      name - the header name.
      Returns:
      the header values.
    • getHttpServletMapping

      public HttpServletMapping getHttpServletMapping()
      Description copied from interface: HttpServletRequest
      Returns the HTTP servlet mapping.
      Specified by:
      getHttpServletMapping in interface HttpServletRequest
      Returns:
      the HTTP servlet mapping
    • setHttpServletMapping

      public void setHttpServletMapping(HttpServletMapping httpServletMapping)
      Parameters:
      httpServletMapping - the httpServletMapping to set
    • getInputStream

      public ServletInputStream getInputStream() throws IOException
      Get the input stream.
      Specified by:
      getInputStream in interface ServletRequest
      Returns:
      the input stream.
      Throws:
      IOException - when a serious I/O error occurs.
    • getIntHeader

      public int getIntHeader(String name)
      Returns the int header.
      Specified by:
      getIntHeader in interface HttpServletRequest
      Parameters:
      name - the name.
      Returns:
      the int header
    • getLocalAddr

      public String getLocalAddr()
      Returns the local address.
      Specified by:
      getLocalAddr in interface ServletRequest
      Returns:
      the local address
    • getLocalName

      public String getLocalName()
      Returns the local name.
      Specified by:
      getLocalName in interface ServletRequest
      Returns:
      the local name
    • getLocalPort

      public int getLocalPort()
      Returns the local port.
      Specified by:
      getLocalPort in interface ServletRequest
      Returns:
      the local port
    • getLocale

      public Locale getLocale()
      Get locale.
      Specified by:
      getLocale in interface ServletRequest
      Returns:
      the locale.
    • getLocales

      public Enumeration<Locale> getLocales()
      Returns the locales.
      Specified by:
      getLocales in interface ServletRequest
      Returns:
      the locales
    • getMethod

      public String getMethod()
      Description copied from interface: HttpServletRequest
      Returns the HTTP method.
      Specified by:
      getMethod in interface HttpServletRequest
      Returns:
      the HTTP method
    • getMultipartConfig

      public MultipartConfigElement getMultipartConfig()
      Description copied from interface: WebApplicationRequest
      Returns the multipartConfig.
      Specified by:
      getMultipartConfig in interface WebApplicationRequest
      Returns:
      the multipartConfig
    • setMultipartConfig

      public void setMultipartConfig(MultipartConfigElement multipartConfig)
      Parameters:
      multipartConfig - the multipartConfig to set
    • getParameter

      public String getParameter(String name)
      Description copied from interface: ServletRequest
      Get the parameter.
      Specified by:
      getParameter in interface ServletRequest
      Parameters:
      name - the name.
      Returns:
      the value or null if not found.
    • getParameterMap

      public Map<String,​String[]> getParameterMap()
      Description copied from interface: ServletRequest
      Returns the parameter map.
      Specified by:
      getParameterMap in interface ServletRequest
      Returns:
      the parameter map
    • getParameterNames

      public Enumeration<String> getParameterNames()
      Description copied from interface: ServletRequest
      Returns the parameter names.
      Specified by:
      getParameterNames in interface ServletRequest
      Returns:
      the parameter names
    • getParameterValues

      public String[] getParameterValues(String name)
      Returns the parameter values.
      Specified by:
      getParameterValues in interface ServletRequest
      Parameters:
      name - the parameter name.
      Returns:
      the parameter values
    • getParametersFromRequest

      protected void getParametersFromRequest()
      Get the parameters from the request.
    • getPart

      public Part getPart(String name) throws IOException, ServletException
      Get the part.
      Specified by:
      getPart in interface HttpServletRequest
      Parameters:
      name - the name.
      Returns:
      the part, or null.
      Throws:
      IOException - when an I/O error occurs.
      ServletException - when a servlet error occurs.
    • getParts

      public Collection<Part> getParts() throws IOException, ServletException
      Get the parts.
      Specified by:
      getParts in interface HttpServletRequest
      Returns:
      the parts.
      Throws:
      IOException - when an I/O error occurs.
      ServletException - when a servlet error occurs.
    • getPathInfo

      public String getPathInfo()
      Returns the path info.
      Specified by:
      getPathInfo in interface HttpServletRequest
      Returns:
      the path info
    • getPathTranslated

      public String getPathTranslated()
      Returns the translated path.
      Specified by:
      getPathTranslated in interface HttpServletRequest
      Returns:
      the translated path
    • getProtocol

      public String getProtocol()
      Returns the protocol.
      Specified by:
      getProtocol in interface ServletRequest
      Returns:
      the protocol
    • getQueryString

      public String getQueryString()
      Returns the query string.
      Specified by:
      getQueryString in interface HttpServletRequest
      Returns:
      the query string
    • getReader

      public BufferedReader getReader() throws IOException
      Get the reader.
      Specified by:
      getReader in interface ServletRequest
      Returns:
      the reader.
      Throws:
      IOException - when a serious I/O error occurs.
    • getRealPath

      @Deprecated public String getRealPath(String path)
      Deprecated.
      Returns the real path.
      Specified by:
      getRealPath in interface ServletRequest
      Parameters:
      path - the path.
      Returns:
      the real path
    • getRemoteAddr

      public String getRemoteAddr()
      Returns the remote address.
      Specified by:
      getRemoteAddr in interface ServletRequest
      Returns:
      the remote address
    • getRemoteHost

      public String getRemoteHost()
      Returns the remote host.
      Specified by:
      getRemoteHost in interface ServletRequest
      Returns:
      the remote host
    • getRemotePort

      public int getRemotePort()
      Returns the remote port.
      Specified by:
      getRemotePort in interface ServletRequest
      Returns:
      the remote port
    • getRemoteUser

      public String getRemoteUser()
      Returns the remote user.
      Specified by:
      getRemoteUser in interface HttpServletRequest
      Returns:
      the remote user
    • getRequestDispatcher

      public RequestDispatcher getRequestDispatcher(String path)
      Returns the request dispatcher.
      Specified by:
      getRequestDispatcher in interface ServletRequest
      Parameters:
      path - the path.
      Returns:
      the request dispatcher
    • getRequestURI

      public String getRequestURI()
      Returns the request URI.
      Specified by:
      getRequestURI in interface HttpServletRequest
      Returns:
      the request URI
    • getRequestURL

      public StringBuffer getRequestURL()
      Returns the request URL.
      Specified by:
      getRequestURL in interface HttpServletRequest
      Returns:
      the request URL
    • getRequestedSessionId

      public String getRequestedSessionId()
      Returns the requested session id.
      Specified by:
      getRequestedSessionId in interface HttpServletRequest
      Returns:
      the requested session id
    • getScheme

      public String getScheme()
      Returns the scheme.
      Specified by:
      getScheme in interface ServletRequest
      Returns:
      the scheme
    • getServerName

      public String getServerName()
      Returns the server name.
      Specified by:
      getServerName in interface ServletRequest
      Returns:
      the server name
    • getServerPort

      public int getServerPort()
      Returns the server port.
      Specified by:
      getServerPort in interface ServletRequest
      Returns:
      the server port
    • getServletContext

      public WebApplication getServletContext()
      Returns the servlet context.
      Specified by:
      getServletContext in interface ServletRequest
      Returns:
      the servlet context
    • getServletPath

      public String getServletPath()
      Returns the servlet path.
      Specified by:
      getServletPath in interface HttpServletRequest
      Returns:
      the servlet path
    • getSession

      public HttpSession getSession()
      Returns the session.
      Specified by:
      getSession in interface HttpServletRequest
      Returns:
      the session
    • getSession

      public HttpSession getSession(boolean create)
      Description copied from interface: HttpServletRequest
      Get the HTTP session.
      Specified by:
      getSession in interface HttpServletRequest
      Parameters:
      create - the create flag.
      Returns:
      the HTTP session, or null if not found and create flag is false.
    • getUpgradeHandler

      public HttpUpgradeHandler getUpgradeHandler()
      Returns the upgrade handler.
      Returns:
      the upgrade handler
    • getUserPrincipal

      public Principal getUserPrincipal()
      Returns the user principal.
      Specified by:
      getUserPrincipal in interface HttpServletRequest
      Returns:
      the user principal
    • isAsyncStarted

      public boolean isAsyncStarted()
      Is async started.
      Specified by:
      isAsyncStarted in interface ServletRequest
      Returns:
      is async started.
    • isAsyncSupported

      public boolean isAsyncSupported()
      Is async supported.
      Specified by:
      isAsyncSupported in interface ServletRequest
      Returns:
      true if is async is supported.
    • isRequestedSessionIdFromCookie

      public boolean isRequestedSessionIdFromCookie()
      Is the requested session id from cookie.
      Specified by:
      isRequestedSessionIdFromCookie in interface HttpServletRequest
      Returns:
      if the requested session id from cookie.
    • isRequestedSessionIdFromURL

      public boolean isRequestedSessionIdFromURL()
      Is the requested session id from the request url.
      Specified by:
      isRequestedSessionIdFromURL in interface HttpServletRequest
      Returns:
      if the requested session id from the request url.
    • isRequestedSessionIdFromUrl

      @Deprecated public boolean isRequestedSessionIdFromUrl()
      Deprecated.
      Is the requested session id from the request url.
      Specified by:
      isRequestedSessionIdFromUrl in interface HttpServletRequest
      Returns:
      if the requested session id from the request url.
    • isRequestedSessionIdValid

      public boolean isRequestedSessionIdValid()
      Is the requested session id valid?
      Specified by:
      isRequestedSessionIdValid in interface HttpServletRequest
      Returns:
      true if it is, false otherwise.
    • isSecure

      public boolean isSecure()
      Is the request secure.
      Specified by:
      isSecure in interface ServletRequest
      Returns:
      is the request secure.
    • isUpgraded

      public boolean isUpgraded()
      Is the request upgraded.
      Returns:
      false
    • isUserInRole

      public boolean isUserInRole(String role)
      Is the user in the specified role.
      Specified by:
      isUserInRole in interface HttpServletRequest
      Parameters:
      role - the role.
      Returns:
      if the user in the specified role.
    • login

      public void login(String username, String password) throws ServletException
      Login.
      Specified by:
      login in interface HttpServletRequest
      Parameters:
      username - the username.
      password - the password.
      Throws:
      ServletException - when a serious error occurs.
    • logout

      public void logout() throws ServletException
      Logout.
      Specified by:
      logout in interface HttpServletRequest
      Throws:
      ServletException - when a serious error occurs.
    • removeAttribute

      public void removeAttribute(String name)
      Remove the attribute.
      Specified by:
      removeAttribute in interface ServletRequest
      Parameters:
      name - the name.
    • setAsyncSupported

      public void setAsyncSupported(boolean asyncSupported)
      Set the async supported flag.
      Parameters:
      asyncSupported - the async supported flag.
    • setAttribute

      public void setAttribute(String name, Object value)
      Set the attribute.
      Specified by:
      setAttribute in interface ServletRequest
      Parameters:
      name - the name.
      value - the value.
    • setAuthType

      public void setAuthType(String authType)
      Set the auth type.
      Parameters:
      authType - the auth type.
    • setCharacterEncoding

      public void setCharacterEncoding(String characterEncoding) throws UnsupportedEncodingException
      Set the character encoding.
      Specified by:
      setCharacterEncoding in interface ServletRequest
      Parameters:
      characterEncoding - the character encoding.
      Throws:
      UnsupportedEncodingException - when the encoding is not supported.
    • setContentLength

      public void setContentLength(int contentLength)
      Set the content length.
      Parameters:
      contentLength - the content length.
    • setContentType

      public void setContentType(String contentType)
      Set the content type.
      Parameters:
      contentType - the content type.
    • setContextPath

      public void setContextPath(String contextPath)
      Description copied from interface: WebApplicationRequest
      Set the context path.
      Specified by:
      setContextPath in interface WebApplicationRequest
      Parameters:
      contextPath - the context path.
    • setCookies

      public void setCookies(Cookie[] cookies)
      Set the cookies.
      Parameters:
      cookies - the cookies.
    • setDispatcherType

      public void setDispatcherType(DispatcherType dispatcherType)
      Set the dispatcher type.
      Specified by:
      setDispatcherType in interface WebApplicationRequest
      Parameters:
      dispatcherType - the dispatcher type.
    • setHeader

      public void setHeader(String name, String value)
      Set the header.
      Parameters:
      name - the name.
      value - the value (string).
    • setInputStream

      public void setInputStream(InputStream inputStream)
      Set the input stream.
      Parameters:
      inputStream - the input stream.
    • setLocalAddr

      public void setLocalAddr(String localAddress)
      Set the local address.
      Parameters:
      localAddress - the local address.
    • setLocalName

      public void setLocalName(String localName)
      Set the local name.
      Parameters:
      localName - the local name.
    • setLocalPort

      public void setLocalPort(int localPort)
      Set the local port.
      Parameters:
      localPort - the local port.
    • setMethod

      public void setMethod(String method)
      Set the method.
      Parameters:
      method - the method.
    • setParameter

      public void setParameter(String name, String[] values)
      Set the parameter values.
      Parameters:
      name - the parameter name.
      values - the values.
    • setPathInfo

      public void setPathInfo(String pathInfo)
      Set the path info.
      Parameters:
      pathInfo - the path info.
    • setProtocol

      public void setProtocol(String protocol)
      Set the protocol.
      Parameters:
      protocol - the protocol.
    • setQueryString

      public void setQueryString(String queryString)
      Set the query string.
      Parameters:
      queryString - the query string.
    • setRemoteAddr

      public void setRemoteAddr(String remoteAddr)
      Set the remote address.
      Parameters:
      remoteAddr - the remote address.
    • setRemoteHost

      public void setRemoteHost(String remoteHost)
      Set the remote host.
      Parameters:
      remoteHost - the remote host.
    • setRemotePort

      public void setRemotePort(int remotePort)
      Set the remote port.
      Parameters:
      remotePort - the remote port.
    • setRequestedSessionId

      public void setRequestedSessionId(String requestedSessionId)
      Set the requested session id.
      Parameters:
      requestedSessionId - the requested session id.
    • setRequestedSessionIdFromCookie

      public void setRequestedSessionIdFromCookie(boolean requestedSessionIdFromCookie)
      Set the requested session id from cookie.
      Parameters:
      requestedSessionIdFromCookie - the requested session id from cookie.
    • setRequestedSessionIdFromURL

      public void setRequestedSessionIdFromURL(boolean requestedSessionIdFromURL)
      Set the request session id from URL flag.
      Parameters:
      requestedSessionIdFromURL - the requested session if from URL flag.
    • setScheme

      public void setScheme(String scheme)
      Set the scheme.
      Parameters:
      scheme - the scheme.
    • setServerName

      public void setServerName(String serverName)
      Set the server name.
      Parameters:
      serverName - the server name.
    • setServerPort

      public void setServerPort(int serverPort)
      Set the server port.
      Parameters:
      serverPort - the server port.
    • setServletPath

      public void setServletPath(String servletPath)
      Description copied from interface: WebApplicationRequest
      Set the servlet path.
      Specified by:
      setServletPath in interface WebApplicationRequest
      Parameters:
      servletPath - the servlet path.
    • getOriginalServletPath

      public String getOriginalServletPath()
      Gets the original Servlet Path
      Returns:
      the original Servlet Path
    • setOriginalServletPath

      public void setOriginalServletPath(String originalServletPath)
      Set the original Servlet Path
      Parameters:
      originalServletPath - the original Servlet Path
    • setUpgraded

      public void setUpgraded(boolean upgraded)
      Set the upgraded flag.
      Parameters:
      upgraded - the upgraded flag.
    • setUserPrincipal

      public void setUserPrincipal(Principal userPrincipal)
      Set the user principal.
      Parameters:
      userPrincipal - the user principal.
    • setWebApplication

      public void setWebApplication(WebApplication webApplication)
      Description copied from interface: WebApplicationRequest
      Set the web application.
      Specified by:
      setWebApplication in interface WebApplicationRequest
      Parameters:
      webApplication - the web application.
    • startAsync

      public AsyncContext startAsync() throws IllegalStateException
      Start async.
      Specified by:
      startAsync in interface ServletRequest
      Returns:
      the async context.
      Throws:
      IllegalStateException - when async is not supported.
    • unwrap

      public static <T> T unwrap(ServletRequest request, Class<T> type)
      Unwrap the request.
      Type Parameters:
      T - the type to unwrap to.
      Parameters:
      request - the request.
      type - the class type of the result
      Returns:
      the unwrapped request.
    • setAsyncStarted

      public void setAsyncStarted(boolean asyncStarted)
      Set the async started flag.
      Parameters:
      asyncStarted - the async started flag.
    • startAsync

      public AsyncContext startAsync(ServletRequest request, ServletResponse response) throws IllegalStateException
      Start async.
      Specified by:
      startAsync in interface ServletRequest
      Parameters:
      request - the request.
      response - the response.
      Returns:
      the async context.
      Throws:
      IllegalStateException - when async is not supported.
    • upgrade

      public <T extends HttpUpgradeHandler> T upgrade(Class<T> handlerClass) throws IOException, ServletException
      Upgrade the request.
      Specified by:
      upgrade in interface HttpServletRequest
      Type Parameters:
      T - the type.
      Parameters:
      handlerClass - the handler class.
      Returns:
      the upgrade handler.
      Throws:
      IOException - when an I/O error occurs.
      ServletException - when a serious error occurs.
    • verifyMultipartFormData

      protected void verifyMultipartFormData() throws ServletException
      Verify the method is of type "multipart/form-data"
      Throws:
      ServletException - the exception thrown when it is not.
    • isFinished

      public boolean isFinished()
      Is the Servlet input stream finished?
      Specified by:
      isFinished in class ServletInputStream
      Returns:
      true if it is, false otherwise.
    • isReady

      public boolean isReady()
      Is the Servlet input stream ready?
      Specified by:
      isReady in class ServletInputStream
      Returns:
      true if it is, false otherwise.
    • setReadListener

      public void setReadListener(ReadListener listener)
      Set the read listener.
      Specified by:
      setReadListener in class ServletInputStream
      Parameters:
      listener - the read listener.
    • read

      public int read() throws IOException
      Read from the Servlet input stream.
      Specified by:
      read in class InputStream
      Returns:
      the read value.
      Throws:
      IOException - when an I/O error occurs.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getRequestURIWithQueryString

      public String getRequestURIWithQueryString()
      Returns the request URI with query string.
      Returns:
      the request URI with query string