FormValue Class

Used to retrieve the value associated with a form input found in the body of an http request. Form values are retrieved on-demand.

Constructors

There are no public constructors.

Public Methods

toInteger( ) returns Integer
Returns the value as an integer. Returns a null if there was a problem converting the value to an integer or if the value is null.
toShort( ) returns Short
Returns the value as a short. Returns a null if there was a problem converting the value to a short or if the value is null.
toDouble( ) returns Double
Returns the value as a double. Returns a null if there was a problem converting the value to a double or if the value is null.
toLong( ) returns Long
Returns the value as a long. Returns a null if there was a problem converting the value to a long or if the value is null.
toBigDecimal( ) returns java.math.BigDecimal
Returns the value as a BigDecimal. Returns a null if there was a problem converting the value to a BigDecimal or if the value is null.
toByteArray( ) returns byte[]
Returns the value as a byte array.
toBoolean( ) returns Boolean
Returns the value as a boolean. Performs a case insensitive comparison between string values representing known booleans (e.g. "true", "false", "yes", "no", "t", "f", "y", "n", "1", "0").
isNumeric( ) returns boolean
Used to determine if the value is numeric.
isNull( ) returns boolean
Used to determine whether the value is null.
toString( ) returns String
Returns the value as a string. Automatically decodes the data if it is url encoded.
toFile( java.io.File file ) returns boolean
Used to save a form value to a file. This is particularly useful when processing large binary data (e.g. uploaded file).
getInputStream( ) returns java.io.InputStream
Returns a java.io.InputStream used to read raw bytes associated with the form value. This is particularly useful when processing large values (e.g. uploaded file).