org.enhydra.xml.xmlc.html.parsers.tidy
Class TidyErrorHandler

java.lang.Object
  |
  +--java.io.Writer
        |
        +--java.io.PrintWriter
              |
              +--org.enhydra.xml.xmlc.html.parsers.tidy.TidyErrorHandler

class TidyErrorHandler
extends PrintWriter

Class for intercepting Tidy error output and doing custom error handing. This is a PrintWrite that overrides all public methods to do our own handling. It parses output looking for errors an warnings and passes them to the XMLC error handler. This is hack, hopefully Tidy.parse will get real error callbacks. It will break if tidy is ever localized.


Fields inherited from class java.io.PrintWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
TidyErrorHandler(ErrorReporter reporter, String fileName, LineNumberMap lineNumberMap)
          Constructor.
 
Method Summary
(package private) static void ()
           
 boolean checkError()
          Flush the stream and check its error state.
 void close()
          Close the stream.
 void flush()
          Flush the stream.
 void println()
          Finish the line.
 void println(boolean x)
          Print a boolean, and then finish the line.
 void println(char x)
          Print a character, and then finish the line.
 void println(char[] x)
          Print an array of characters, and then finish the line.
 void println(double x)
          Print a double, and then finish the line.
 void println(float x)
          Print a float, and then finish the line.
 void println(int x)
          Print an integer, and then finish the line.
 void println(long x)
          Print a long, and then finish the line.
 void println(Object x)
          Print an Object, and then finish the line.
 void println(String x)
          Print a String, and then finish the line.
 void write(char[] buf, int off, int len)
          Write a portion of an array of characters.
 void write(int c)
          Write a single character.
 void write(String s)
          Write a string.
 void write(String s, int off, int len)
          Write a portion of a string.
 
Methods inherited from class java.io.PrintWriter
print, print, print, print, print, print, print, print, print, setError, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TidyErrorHandler

public TidyErrorHandler(ErrorReporter reporter,
                        String fileName,
                        LineNumberMap lineNumberMap)
Constructor.
Method Detail

static void ()

flush

public void flush()
Flush the stream.
Overrides:
flush in class PrintWriter

close

public void close()
Close the stream.
Overrides:
close in class PrintWriter

checkError

public boolean checkError()
Flush the stream and check its error state.
Overrides:
checkError in class PrintWriter

write

public void write(int c)
Write a single character.
Overrides:
write in class PrintWriter

write

public void write(char[] buf,
                  int off,
                  int len)
Write a portion of an array of characters.
Overrides:
write in class PrintWriter

write

public void write(String s,
                  int off,
                  int len)
Write a portion of a string.
Overrides:
write in class PrintWriter

write

public void write(String s)
Write a string.
Overrides:
write in class PrintWriter

println

public void println()
Finish the line.
Overrides:
println in class PrintWriter

println

public void println(boolean x)
Print a boolean, and then finish the line.
Overrides:
println in class PrintWriter

println

public void println(char x)
Print a character, and then finish the line.
Overrides:
println in class PrintWriter

println

public void println(int x)
Print an integer, and then finish the line.
Overrides:
println in class PrintWriter

println

public void println(long x)
Print a long, and then finish the line.
Overrides:
println in class PrintWriter

println

public void println(float x)
Print a float, and then finish the line.
Overrides:
println in class PrintWriter

println

public void println(double x)
Print a double, and then finish the line.
Overrides:
println in class PrintWriter

println

public void println(char[] x)
Print an array of characters, and then finish the line.
Overrides:
println in class PrintWriter

println

public void println(String x)
Print a String, and then finish the line.
Overrides:
println in class PrintWriter

println

public void println(Object x)
Print an Object, and then finish the line.
Overrides:
println in class PrintWriter


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.