org.lobobrowser.html
public class FormInput extends java.lang.Object
FormInput
class contains the state
of an HTML form input item.Modifier and Type | Field and Description |
---|---|
static FormInput[] |
EMPTY_ARRAY |
Constructor and Description |
---|
FormInput(java.lang.String name,
java.io.File value)
Constructs a
FormInput
with a file value. |
FormInput(java.lang.String name,
java.lang.String value)
Constructs a
FormInput
with a text value. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCharset()
Deprecated.
The method is implemented only to provide some backward compatibility.
|
java.io.File |
getFileValue()
Gets the file value of the form input.
|
java.io.InputStream |
getInputStream()
Deprecated.
Call either
getTextValue() or getFileValue() instead. |
java.lang.String |
getName()
Gets the name of the input.
|
java.lang.String |
getTextValue()
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.
|
java.lang.String |
toString()
Shows a string representation of the
FormInput
that may be useful in debugging. |
public static final FormInput[] EMPTY_ARRAY
public FormInput(java.lang.String name, java.lang.String value)
FormInput
with a text value.name
- The name of the input.value
- The value of the input.public FormInput(java.lang.String name, java.io.File value)
FormInput
with a file value.name
- The name of the input.value
- The value of the input.public java.lang.String getName()
public boolean isText()
public boolean isFile()
public java.lang.String getTextValue()
isText()
public java.io.File getFileValue()
isFile()
public java.lang.String getCharset()
public java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
public java.lang.String toString()
FormInput
that may be useful in debugging.toString
in class java.lang.Object
getTextValue()