|
|||||||||
| Home >> All >> com >> meterware >> httpunit >> [ parsing overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.meterware.httpunit.parsing
Class JTidyPrintWriter

java.lang.Objectjava.io.Writer
java.io.PrintWriter
com.meterware.httpunit.parsing.JTidyPrintWriter
- class JTidyPrintWriter
- extends java.io.PrintWriter
Basic "parser" for the JTidy error output. Will get the line and column number as well as the message. It assumes that an error or warning is to be logged once println() has been called or if a string starts with "line"
| Field Summary | |
private int |
_column
|
private boolean |
_error
|
private int |
_line
|
private boolean |
_logged
|
private java.lang.String |
_msg
|
private java.net.URL |
_url
|
private static java.text.NumberFormat |
INTEGER_FORMAT
DecimalFormat.getNumberInstance() should provide us with a proper formatter for the default locale. |
| Fields inherited from class java.io.PrintWriter |
out |
| Fields inherited from class java.io.Writer |
lock |
| Constructor Summary | |
(package private) |
JTidyPrintWriter(java.net.URL pageURL)
|
| Method Summary | |
private void |
log()
reports the warning or error and then resets the current error/warning. |
private int |
parseInteger(java.lang.String integer)
|
void |
print(boolean b)
This methods prints a boolean value to the stream. |
void |
print(char c)
This method prints a char to the stream. |
void |
print(char[] s)
This method prints an array of characters to the stream. |
void |
print(double d)
This method prints a double to the stream. |
void |
print(float f)
This method prints a float to the stream. |
void |
print(int i)
This method prints an integer to the stream. |
void |
print(long l)
This method prints a long to the stream. |
void |
print(java.lang.Object obj)
This method prints an Object to the stream. |
void |
print(java.lang.String s)
Detects a new log if starting with "line", a warning if message starts with "Warning" and an error if it starts with "Error" |
void |
println()
This method prints a line separator sequence to the stream. |
void |
println(boolean x)
This methods prints a boolean value to the stream. |
void |
println(char c)
This method prints a char to the stream. |
void |
println(char[] c)
This method prints an array of characters to the stream. |
void |
println(double d)
This method prints a double to the stream. |
void |
println(float f)
This method prints a float to the stream. |
void |
println(int i)
This method prints an integer to the stream. |
void |
println(long l)
This method prints a long to the stream. |
void |
println(java.lang.Object o)
This method prints an Object to the stream. |
void |
println(java.lang.String s)
This method prints a String to the stream. |
private void |
reportError(java.lang.String msg,
int line,
int column)
|
private void |
reportWarning(java.lang.String msg,
int line,
int column)
|
| Methods inherited from class java.io.PrintWriter |
checkError, close, flush, 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 |
INTEGER_FORMAT
private static final java.text.NumberFormat INTEGER_FORMAT
- DecimalFormat.getNumberInstance() should provide us with a proper formatter for the default locale. The
integers returned from JTidy contain the appropriate decimal separator for the current locale.
_line
private int _line
_column
private int _column
_msg
private java.lang.String _msg
_error
private boolean _error
_logged
private boolean _logged
_url
private java.net.URL _url
| Constructor Detail |
JTidyPrintWriter
JTidyPrintWriter(java.net.URL pageURL)
| Method Detail |
public void print(boolean b)
- Description copied from class:
java.io.PrintWriter - This methods prints a boolean value to the stream.
truevalues are printed as "true" andfalsevalues are printed as "false".
public void print(char c)
- Description copied from class:
java.io.PrintWriter - This method prints a char to the stream. The actual value printed is
determined by the character encoding in use.
public void print(char[] s)
- Description copied from class:
java.io.PrintWriter - This method prints an array of characters to the stream. The actual
value printed depends on the system default encoding.
public void print(double d)
- Description copied from class:
java.io.PrintWriter - This method prints a double to the stream. The value printed is
determined using the
String.valueOf()method.
public void print(float f)
- Description copied from class:
java.io.PrintWriter - This method prints a float to the stream. The value printed is
determined using the
String.valueOf()method.
public void print(int i)
- Description copied from class:
java.io.PrintWriter - This method prints an integer to the stream. The value printed is
determined using the
String.valueOf()method.
public void print(long l)
- Description copied from class:
java.io.PrintWriter - This method prints a long to the stream. The value printed is
determined using the
String.valueOf()method.
public void print(java.lang.Object obj)
- Description copied from class:
java.io.PrintWriter - This method prints an
Objectto the stream. The actual value printed is determined by calling theString.valueOf()method.
public void print(java.lang.String s)
- Detects a new log if starting with "line", a warning if message starts with "Warning"
and an error if it starts with "Error"
parseInteger
private int parseInteger(java.lang.String integer)
println
public void println()
- Description copied from class:
java.io.PrintWriter - This method prints a line separator sequence to the stream. The value
printed is determined by the system property
line.separator and is not necessarily the Unix '\n' newline character.
println
public void println(boolean x)
- Description copied from class:
java.io.PrintWriter - This methods prints a boolean value to the stream.
truevalues are printed as "true" andfalsevalues are printed as "false". This method prints a line termination sequence after printing the value.
println
public void println(char c)
- Description copied from class:
java.io.PrintWriter - This method prints a char to the stream. The actual value printed is
determined by the character encoding in use.
This method prints a line termination sequence after printing the value.
println
public void println(char[] c)
- Description copied from class:
java.io.PrintWriter - This method prints an array of characters to the stream. The actual
value printed depends on the system default encoding.
This method prints a line termination sequence after printing the value.
println
public void println(double d)
- Description copied from class:
java.io.PrintWriter - This method prints a double to the stream. The value printed is
determined using the
String.valueOf()method. This method prints a line termination sequence after printing the value.
println
public void println(float f)
- Description copied from class:
java.io.PrintWriter - This method prints a float to the stream. The value printed is
determined using the
String.valueOf()method. This method prints a line termination sequence after printing the value.
println
public void println(int i)
- Description copied from class:
java.io.PrintWriter - This method prints an integer to the stream. The value printed is
determined using the
String.valueOf()method. This method prints a line termination sequence after printing the value.
println
public void println(long l)
- Description copied from class:
java.io.PrintWriter - This method prints a long to the stream. The value printed is
determined using the
String.valueOf()method. This method prints a line termination sequence after printing the value.
println
public void println(java.lang.Object o)
- Description copied from class:
java.io.PrintWriter - This method prints an
Objectto the stream. The actual value printed is determined by calling theString.valueOf()method. This method prints a line termination sequence after printing the value.
println
public void println(java.lang.String s)
- Description copied from class:
java.io.PrintWriter - This method prints a
Stringto the stream. The actual value printed depends on the system default encoding. This method prints a line termination sequence after printing the value.
log
private void log()
- reports the warning or error and then resets the current error/warning.
reportError
private void reportError(java.lang.String msg, int line, int column)
reportWarning
private void reportWarning(java.lang.String msg, int line, int column)
|
|||||||||
| Home >> All >> com >> meterware >> httpunit >> [ parsing overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC