edu.udo.cs.miningmart.gui.application
Class PrintViewHandler

java.lang.Object
  extended byjava.util.logging.Handler
      extended byedu.udo.cs.miningmart.gui.application.PrintViewHandler

public class PrintViewHandler
extends java.util.logging.Handler

A Handler for the PrintViewer.

Version:
$Id: PrintViewHandler.java,v 1.3 2006/04/11 14:10:15 euler Exp $
Author:
Daniel Hakenjos

Constructor Summary
PrintViewHandler(java.io.OutputStream out)
          Create a StreamHandler with a given Formatter and output stream.
PrintViewHandler(java.io.OutputStream out, java.util.logging.Formatter formatter)
          Create a StreamHandler with a given Formatter and output stream.
 
Method Summary
 void close()
           
 void flush()
           
 void publish(java.util.logging.LogRecord record)
          Format and publish a LogRecord.
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintViewHandler

public PrintViewHandler(java.io.OutputStream out)
Create a StreamHandler with a given Formatter and output stream.

Parameters:
out - the target output stream

PrintViewHandler

public PrintViewHandler(java.io.OutputStream out,
                        java.util.logging.Formatter formatter)
Create a StreamHandler with a given Formatter and output stream.

Parameters:
out - the target output stream
formatter - Formatter to be used to format output
Method Detail

publish

public void publish(java.util.logging.LogRecord record)
Format and publish a LogRecord.

The StreamHandler first checks if there is an OutputStream and if the given LogRecord has at least the required log level. If not it silently returns. If so, it calls any associated Filter to check if the record should be published. If so, it calls its Formatter to format the record and then writes the result to the current output stream.

If this is the first LogRecord to be written to a given OutputStream, the Formatter's "head" string is written to the stream before the LogRecord is written.

Parameters:
record - description of the log event. A null record is silently ignored and is not published

close

public void close()
           throws java.lang.SecurityException
Throws:
java.lang.SecurityException

flush

public void flush()


Copyright © 2001-2005