All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.studioitech.gulli.MJDBC.E

java.lang.Object
   |
   +----com.studioitech.gulli.MJDBC.E

public class E
extends Object

A class to handle debug message. It store messages until flush() is done, or autoflush() is called. It is useful for servlet enviroment. During the init() phase, one can not produce HTML output directly. So you can use E class in this way

	public void init(ServletConfig config)
		throws ServletException
	{
		super.init(config);     
      doYourInitWork();	
		E.debug("Initing done", 0);
	}
  

// doGet Method - method that runs when the servlet is hit via GET

public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { PrintWriter out; res.setContentType("text/html"); out = res.getWriter (); E.setOutput(out); // set output channel E.flush(); // flush the acquired buffer, if any E.setAutoFlush(true);// now set autoflush doYourDoGetCode(); }


Constructor Index

 o E()

Method Index

 o debug(String, int)
Print a debug message if its associated level is less then current DEBUG_LEVEL.

Note that:

 o flush()
Print the buffer if the associated PrintWriter channel is setted via setOutput(); In every case it frees the buffer

 o setAutoFlush(boolean)
set autoflush to the given boolean value

 o setDebugLevel(int)
set DEBUG_LEVEL to the given integer value

 o setOutput(PrintWriter)
set the PrintWriter to write message

Constructors

 o E
 public E()

Methods

 o setDebugLevel
 public static void setDebugLevel(int dl)
set DEBUG_LEVEL to the given integer value

Parameters:
dl - the debug level to set
 o setOutput
 public static void setOutput(PrintWriter pw)
set the PrintWriter to write message

Parameters:
pw - the PrintWriter channel to set
 o setAutoFlush
 public static void setAutoFlush(boolean value)
set autoflush to the given boolean value

Parameters:
value - the boolean value to set
 o debug
 public static void debug(String s,
                          int level)
Print a debug message if its associated level is less then current DEBUG_LEVEL.

Note that:

Parameters:
s - the string to print
level - the debug level to set
 o flush
 public static void flush()
Print the buffer if the associated PrintWriter channel is setted via setOutput(); In every case it frees the buffer


All Packages  Class Hierarchy  This Package  Previous  Next  Index