OOP MimeParser Version 3.5

com.bentofw.util
Class TooLargeBodyException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.bentofw.util.TooLargeBodyException
All Implemented Interfaces:
java.io.Serializable

public class TooLargeBodyException
extends java.lang.RuntimeException

When the Content-Length of the request exceeds the specified max size, this exception is thrown.

This execption will be thrown by:

at the very first stage. Before processing the request, these classes check the Content-Length of each request and compare it with the specified max size. If it is larger than the specified max size, these class will throw this exception. This feature gives the Servlet/JSP the greater control over abnormal client request behavior, which may be useful for avoiding some forms of denial-of-service attacks.

The maximum size to be allowed can be specified by the property resource file for each class. For detail, please refer to the documentation of these classes.

Since:
1.4
Author:
Jun Inamori

com.bentofw.web.mime.MimeParser

See Also:
Serialized Form

Constructor Summary
TooLargeBodyException(int size, int max)
          When the Content-Length of the request exceeds the specified max size, this exception is thrown.
 
Method Summary
 java.lang.String getCurrentContentLength()
          Return the Content-Length of the current request.
 java.lang.String getMaxContentLength()
          Return the maximum Content-Length to be allowed.
 java.lang.String getMessage()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TooLargeBodyException

public TooLargeBodyException(int size,
                             int max)
When the Content-Length of the request exceeds the specified max size, this exception is thrown.

This execption will be thrown by: at the very first stage.

Method Detail

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable

getCurrentContentLength

public java.lang.String getCurrentContentLength()
Return the Content-Length of the current request.

Returns:
The Content-Length of the request.

getMaxContentLength

public java.lang.String getMaxContentLength()
Return the maximum Content-Length to be allowed.

Returns:
The maximum Content-Length to be allowed

OOP MimeParser Version 3.5

ALL CONTENTS COPYRIGHT 2005, OOP-Research Corporation. All rights reserved.
Any questions and comments are welcome to OOP-Research Corporation.