Package org.lobobrowser.html
Class FormInput
java.lang.Object
org.lobobrowser.html.FormInput
The
FormInput
class contains the state
of an HTML form input item.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.The method is implemented only to provide some backward compatibility.Gets the file value of the form input.Deprecated.Call eithergetTextValue()
orgetFileValue()
instead.getName()
Gets the name of the input.Gets the text value of the form input.boolean
isFile()
Returns true if the form input holds a file value.boolean
isText()
Returns true if the form input holds a text value.toString()
Shows a string representation of theFormInput
that may be useful in debugging.
-
Field Details
-
EMPTY_ARRAY
-
-
Constructor Details
-
FormInput
Constructs aFormInput
with a text value.- Parameters:
name
- The name of the input.value
- The value of the input.
-
FormInput
Constructs aFormInput
with a file value.- Parameters:
name
- The name of the input.value
- The value of the input.
-
-
Method Details
-
getName
Gets the name of the input. -
isText
public boolean isText()Returns true if the form input holds a text value. -
isFile
public boolean isFile()Returns true if the form input holds a file value. -
getTextValue
Gets the text value of the form input. If the form input does not hold a text value, this method should not be called.- See Also:
-
getFileValue
Gets the file value of the form input. If the form input does not hold a file value, this method should not be called.- See Also:
-
getCharset
Deprecated.The method is implemented only to provide some backward compatibility.Always returns UTF-8. -
getInputStream
Deprecated.Call eithergetTextValue()
orgetFileValue()
instead.Gets data as an input stream. The caller is responsible for closing the stream.- Throws:
IOException
-
toString
Shows a string representation of theFormInput
that may be useful in debugging.
-