Java Reference
In-Depth Information
}
/**
* Create a new line by displaying a carriage return and
* linefeed.
*
* @throws IOException
* If any error occurs while writing.
*/
private void newline() throws IOException
{
write("\r\n");
}
/**
* Write the specified string, without a carriage return
* and line feed.
*
* @param str
* The String to write.
* @throws IOException
* If any error occurs while writing.
*/
private void write(String str) throws IOException
{
this.os.write(str.getBytes());
}
/**
* Write the name element for a multipart post.
*
* @param name
* The name of the field.
* @throws IOException
* If any error occurs while writing.
*/
private void writeName(String name) throws IOException
{
newline();
write("Content-Disposition: form-data; name=\"");
write(name);
write("\"");
}
/**
* Write a string, with a carriage return and linefeed.
Search WWH ::




Custom Search