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

protected FormValue( javaxt.http.servlet.FormInput input )

Methods

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).
isNull( ) returns boolean
Used to determine whether the value is null.
isNumeric( ) returns boolean
Used to determine if the value is numeric.
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.
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").
toByteArray( ) returns byte[]
Returns the value as a byte array.
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.
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).
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.
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.
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.
toString( ) returns String
Returns the value as a string. Automatically decodes the data if it is url encoded.