|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.ibm.wbi.markuplanguage.html.HtmlEditor
Class to edit HTML sources.
| Field Summary | |
protected boolean |
eofp
|
protected HtmlTokenizer |
in
|
protected HtmlItem |
item
|
protected boolean |
needsFlushing
This one is a little sketchy. |
protected java.io.Writer |
out
|
| Constructor Summary | |
HtmlEditor(java.io.InputStream is,
java.io.OutputStream os)
Deprecated. Use HtmlEditor(Reader, Writer) instead |
|
HtmlEditor(java.io.Reader r,
java.io.Writer w)
Creates a new HtmlEditor on a Reader and a Writer. |
|
| Method Summary | |
boolean |
atEOF()
Indicates whether editor has gone past the end of the stream. |
HtmlItem |
copyUntil(java.lang.String tagId)
Reads from the input stream until the specified tag was found. |
HtmlItem |
copyUntil(java.lang.String[] tagId)
Reads from the stream until any one of a set of tag types is found. |
static void |
main(java.lang.String[] args)
Main method to test HtmlEditor. |
HtmlItem |
nextToken()
Get the next token from the input stream (HtmlItem). |
HtmlItem |
readUntil(java.lang.String tagId)
Reads from the input stream until the specified tag was found. |
HtmlItem |
readUntil(java.lang.String[] tagId)
Reads from the stream until any one of a set of tag types is found. |
HtmlItem |
readUntil(java.lang.String[] tagId,
boolean copy)
Reads from the stream until any one of a set of tag types is found. |
HtmlItem |
readUntil(java.lang.String tagId,
boolean copy)
Reads from the stream until a particular tag (HTML Element) type is found. |
HtmlItem |
readUntil(java.lang.String tagId,
java.lang.StringBuffer textUpTo)
Reads from the stream until a particular tag (HTML Element) type is found. |
void |
write(byte[] b)
Deprecated. You shouldn't be dealing with bytes!!!! Use write(char[]) instead. |
void |
write(char[] ch)
|
void |
write(HtmlItem item)
Writes an HtmlItem to the output stream. |
void |
write(java.lang.String s)
Write string to the output stream. |
void |
writeLastToken()
Write the last token that was read from the inputstream. |
void |
writeRemaining()
Writes the remaining data from the input stream to the output stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.io.Writer out
protected HtmlItem item
protected HtmlTokenizer in
protected boolean eofp
protected boolean needsFlushing
| Constructor Detail |
public HtmlEditor(java.io.Reader r,
java.io.Writer w)
r - Reader containing the HTML source to edit.w - Writer that will be used to write the edited HTML source.
public HtmlEditor(java.io.InputStream is,
java.io.OutputStream os)
is - Input stream containing the HTML source to edit.os - Ouput stream that will be used to write the edited HTML source.| Method Detail |
public boolean atEOF()
public HtmlItem nextToken()
public void writeLastToken()
throws java.io.IOException
public void write(java.lang.String s)
throws java.io.IOException
s - String to write to the output stream.
public void write(byte[] b)
throws java.io.IOException
b[] - Byte buffer to write to the output stream.
public void write(char[] ch)
throws java.io.IOException
public void write(HtmlItem item)
throws java.io.IOException
The - HtmlItem.
public HtmlItem readUntil(java.lang.String tagId,
boolean copy)
throws java.io.IOException
tagId - String representation of the HTML element this function is looking for.If - true, all the data read from the stream will be written to
the output stream.
public HtmlItem readUntil(java.lang.String tagId,
java.lang.StringBuffer textUpTo)
throws java.io.IOException
tagId - String representation of the HTML element this function is looking for.textUpTo - StringBuffer. All the data read from the stream will be written to this buffer
until tag was found.
public void writeRemaining()
throws java.io.IOException
public HtmlItem readUntil(java.lang.String tagId)
throws java.io.IOException
tagId - String representation of the HTML element this function is looking for.
public HtmlItem copyUntil(java.lang.String tagId)
throws java.io.IOException
tagId - String representation of the HTML element this function is looking for.
public HtmlItem readUntil(java.lang.String[] tagId,
boolean copy)
throws java.io.IOException
tagId[] - String representation of the HTML element this function is looking for.If - true, all the data read from the stream will be written to
the output stream.
public HtmlItem readUntil(java.lang.String[] tagId)
throws java.io.IOException
tagId[] - String representation of the HTML element this function is looking for.
public HtmlItem copyUntil(java.lang.String[] tagId)
throws java.io.IOException
tagId[] - String representation of the HTML element this function is looking for.public static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||