Class UrlEncodedFormWriter
- java.lang.Object
-
- org.codehaus.cargo.container.internal.http.writer.UrlEncodedFormWriter
-
public class UrlEncodedFormWriter extends Object
Represents a form writer that allows writing form fields that are URL encoded.
-
-
Constructor Summary
Constructors Constructor Description UrlEncodedFormWriter()
Constructs an UrlEncodedFormWriter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addField(String name, String value)
Writes a string field value.int
getLength()
void
write(OutputStream os)
Writes the form data to the output stream.
-
-
-
Method Detail
-
addField
public void addField(String name, String value) throws IOException
Writes a string field value.- Parameters:
name
- the field name (required)value
- the field value- Throws:
IOException
- on input/output errors
-
write
public void write(OutputStream os) throws IOException
Writes the form data to the output stream.- Parameters:
os
- The output stream- Throws:
IOException
- on input/output errors
-
getLength
public int getLength()
- Returns:
- the length of the url encoded form data
-
-