|
|||||||||
| Home >> All >> com >> voytechs >> html >> [ io overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.voytechs.html.io
Class HtmlWriter

java.lang.Objectjava.io.Writer
java.io.PrintWriter
com.voytechs.html.io.HtmlWriter
- public class HtmlWriter
- extends java.io.PrintWriter
Html Print Writer.
Will output HTML primitives on the supplied outputstream.
Because Http protocol allows binary output to the stream as long
as the appropriate MIME header is supplied, this object also allows
access to the underlying output stream so binary data can be output
as well if needed (getOutputStream());
This writer supplies all of the basic HTML 4.0 tags. It also supplies
some convenience functions.
3 types of HTML tag methods exist.
- *Start() and *End() mentods. ie. formStart() & formEnd()
- Convenience functions that supply both start and end tags. ie form(String formBody)
- Tags that do not have closing Tags. ie horizontalRule()
| Field Summary | |
private java.io.OutputStream |
outStream
|
| Fields inherited from class java.io.PrintWriter |
out |
| Fields inherited from class java.io.Writer |
lock |
| Constructor Summary | |
HtmlWriter(java.io.OutputStream outStream)
|
|
| Method Summary | |
void |
a(java.lang.String href,
java.lang.String params)
HTML anchor START tag. |
void |
aEnd()
HTML anchor END tag. |
void |
b()
|
void |
bEnd()
|
void |
body()
HTML body START tag. |
void |
body(java.lang.String params)
HTML body START tag. |
void |
bodyEnd()
HTML body END tag. |
void |
br()
|
void |
caption(java.lang.String params)
|
void |
captionEnd()
|
void |
checkbox(java.lang.String name,
java.lang.String index,
java.lang.String label,
java.lang.String params)
HTML INPUT TYPE=CHECKBOX tag. |
void |
form(java.lang.String actionUrl,
java.lang.String params)
HTML FORM START tag. |
void |
formEnd()
HTML FORM END tag. |
java.io.OutputStream |
getOutputStream()
Get the underlying output stream of this writer. |
void |
head()
HTML document header START tag. |
void |
head(java.lang.String params)
HTML document header START tag. |
void |
headEnd()
HTML document header END tag. |
void |
hr()
|
void |
html()
HTML document START tag. |
void |
htmlEnd()
HTML document END tag. |
void |
i()
|
void |
iEnd()
|
void |
img(java.lang.String uri,
java.lang.String params)
HTML SCRIPT END tag. |
void |
input(java.lang.String type,
java.lang.String name,
java.lang.String params)
HTML INPUT tag. |
static void |
main(java.lang.String[] args)
Test function for HtmlWriter |
void |
option(java.lang.String index,
java.lang.String label,
java.lang.String params)
HTML OPTION tag. |
void |
password(java.lang.String name,
java.lang.String params)
HTML INPUT TYPE=PASSWORD tag. |
void |
radio(java.lang.String name,
java.lang.String index,
java.lang.String label,
java.lang.String params)
HTML INPUT TYPE=RADIO tag. |
void |
reset(java.lang.String params)
HTML INPUT TYPE=RESET tag. |
void |
script(java.lang.String language,
java.lang.String params)
HTML SCRIPT START tag. |
void |
scriptEnd()
HTML SCRIPT END tag. |
void |
select(java.lang.String name,
java.lang.String params)
HTML SELECT START tag. |
void |
selectEnd()
HTML SELECT END tag. |
void |
submit(java.lang.String name,
java.lang.String params)
HTML INPUT TYPE=SUBMIT tag. |
void |
table(java.lang.String params)
HTML TABLE START tag. |
void |
tableEnd()
HTML TABLE END tag. |
void |
tBody(java.lang.String params)
|
void |
tBodyEnd()
|
void |
td(java.lang.String params)
HTML TABLE DATA START tag. |
void |
tdEnd()
HTML TABLE DATA END tag. |
void |
text(java.lang.String name,
java.lang.String params)
HTML INPUT TYPE=TEXT tag. |
void |
textarea(java.lang.String name,
java.lang.String params)
HTML Textarea START tag. |
void |
textareaEnd()
HTML Textarea END tag. |
void |
tFoot(java.lang.String params)
|
void |
tFootEnd()
|
void |
th(java.lang.String params)
HTML TABLE HEADER START tag. |
void |
tHead(java.lang.String params)
|
void |
tHeadEnd()
|
void |
thEnd()
HTML TABLE HEADER END tag. |
void |
tr(java.lang.String params)
HTML TABLE ROW START tag. |
void |
trEnd()
HTML TABLE ROW END tag. |
| Methods inherited from class java.io.PrintWriter |
checkError, close, flush, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
outStream
private java.io.OutputStream outStream
| Constructor Detail |
HtmlWriter
public HtmlWriter(java.io.OutputStream outStream) throws java.io.IOException
| Method Detail |
getOutputStream
public java.io.OutputStream getOutputStream()
- Get the underlying output stream of this writer.
html
public void html()
throws java.io.IOException
- HTML document START tag.
htmlEnd
public void htmlEnd()
throws java.io.IOException
- HTML document END tag.
body
public void body()
throws java.io.IOException
- HTML body START tag. Requires an END tag.
body
public void body(java.lang.String params) throws java.io.IOException
- HTML body START tag. Requires an END tag.
bodyEnd
public void bodyEnd()
throws java.io.IOException
- HTML body END tag.
head
public void head()
throws java.io.IOException
- HTML document header START tag. Requires an END tag.
head
public void head(java.lang.String params) throws java.io.IOException
- HTML document header START tag. Requires an END tag.
headEnd
public void headEnd()
throws java.io.IOException
- HTML document header END tag.
a
public void a(java.lang.String href, java.lang.String params) throws java.io.IOException
- HTML anchor START tag. Requires an END tag.
aEnd
public void aEnd()
throws java.io.IOException
- HTML anchor END tag.
form
public void form(java.lang.String actionUrl, java.lang.String params) throws java.io.IOException
- HTML FORM START tag. The default HTTP POST method is used. Requires an END tag.
formEnd
public void formEnd()
throws java.io.IOException
- HTML FORM END tag.
input
public void input(java.lang.String type, java.lang.String name, java.lang.String params) throws java.io.IOException
- HTML INPUT tag.
text
public void text(java.lang.String name, java.lang.String params) throws java.io.IOException
- HTML INPUT TYPE=TEXT tag.
password
public void password(java.lang.String name, java.lang.String params) throws java.io.IOException
- HTML INPUT TYPE=PASSWORD tag.
submit
public void submit(java.lang.String name, java.lang.String params) throws java.io.IOException
- HTML INPUT TYPE=SUBMIT tag.
radio
public void radio(java.lang.String name, java.lang.String index, java.lang.String label, java.lang.String params) throws java.io.IOException
- HTML INPUT TYPE=RADIO tag.
checkbox
public void checkbox(java.lang.String name, java.lang.String index, java.lang.String label, java.lang.String params) throws java.io.IOException
- HTML INPUT TYPE=CHECKBOX tag.
reset
public void reset(java.lang.String params) throws java.io.IOException
- HTML INPUT TYPE=RESET tag.
textarea
public void textarea(java.lang.String name, java.lang.String params) throws java.io.IOException
- HTML Textarea START tag. Requires an END tag.
textareaEnd
public void textareaEnd()
throws java.io.IOException
- HTML Textarea END tag.
select
public void select(java.lang.String name, java.lang.String params) throws java.io.IOException
- HTML SELECT START tag. Selection list box. Requires an END tag.
selectEnd
public void selectEnd()
throws java.io.IOException
- HTML SELECT END tag. Selection list box.
option
public void option(java.lang.String index, java.lang.String label, java.lang.String params) throws java.io.IOException
- HTML OPTION tag. List box element.
table
public void table(java.lang.String params) throws java.io.IOException
- HTML TABLE START tag. Requires an END tag.
tableEnd
public void tableEnd()
throws java.io.IOException
- HTML TABLE END tag.
tBody
public void tBody(java.lang.String params) throws java.io.IOException
tBodyEnd
public void tBodyEnd()
throws java.io.IOException
tHead
public void tHead(java.lang.String params) throws java.io.IOException
tHeadEnd
public void tHeadEnd()
throws java.io.IOException
tFoot
public void tFoot(java.lang.String params) throws java.io.IOException
tFootEnd
public void tFootEnd()
throws java.io.IOException
caption
public void caption(java.lang.String params) throws java.io.IOException
captionEnd
public void captionEnd()
throws java.io.IOException
th
public void th(java.lang.String params) throws java.io.IOException
- HTML TABLE HEADER START tag. Requires an END tag.
thEnd
public void thEnd()
throws java.io.IOException
- HTML TABLE HEADER END tag. Requires an END tag.
tr
public void tr(java.lang.String params) throws java.io.IOException
- HTML TABLE ROW START tag. Requires an END tag.
trEnd
public void trEnd()
throws java.io.IOException
- HTML TABLE ROW END tag. Requires an END tag.
td
public void td(java.lang.String params) throws java.io.IOException
- HTML TABLE DATA START tag. Requires an END tag.
tdEnd
public void tdEnd()
throws java.io.IOException
- HTML TABLE DATA END tag. Requires an END tag.
script
public void script(java.lang.String language, java.lang.String params) throws java.io.IOException
- HTML SCRIPT START tag. Requires an END tag.
scriptEnd
public void scriptEnd()
throws java.io.IOException
- HTML SCRIPT END tag. Requires an END tag.
img
public void img(java.lang.String uri, java.lang.String params) throws java.io.IOException
- HTML SCRIPT END tag. Requires an END tag.
br
public void br()
throws java.io.IOException
hr
public void hr()
throws java.io.IOException
i
public void i()
throws java.io.IOException
iEnd
public void iEnd()
throws java.io.IOException
b
public void b()
throws java.io.IOException
bEnd
public void bEnd()
throws java.io.IOException
main
public static void main(java.lang.String[] args)
- Test function for HtmlWriter
|
|||||||||
| Home >> All >> com >> voytechs >> html >> [ io overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC