Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.meterware.httpunit.parsing
Class JTidyPrintWriter  view JTidyPrintWriter download JTidyPrintWriter.java

java.lang.Object
  extended byjava.io.Writer
      extended byjava.io.PrintWriter
          extended bycom.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

print

public void print(boolean b)
Description copied from class: java.io.PrintWriter
This methods prints a boolean value to the stream. true values are printed as "true" and false values are printed as "false".


print

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.


print

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.


print

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.


print

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.


print

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.


print

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.


print

public void print(java.lang.Object obj)
Description copied from class: java.io.PrintWriter
This method prints an Object to the stream. The actual value printed is determined by calling the String.valueOf() method.


print

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. true values are printed as "true" and false values 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 Object to the stream. The actual value printed is determined by calling the String.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 String to 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)