org.alicebot.server.core.util
Class MessagePrinter

java.lang.Object
  extended by org.alicebot.server.core.util.MessagePrinter

public class MessagePrinter
extends java.lang.Object

Provides standard formatting for messages.

Version:
4.1.3
Author:
Noel Bush

Field Summary
static int CONSOLE
          A destination flag indicating the console.
static int LOG
          A destination flag indicating logging.
 
Constructor Summary
MessagePrinter()
           
 
Method Summary
static void gotLine()
          Tells the MessagePrinter that we got an input; not midLine anymore.
static void print(java.lang.String message, java.lang.String typeFlag, java.io.PrintStream out, int destination)
          Print a message (no linebreak) with a type flag to a PrintStream.
static void println(java.lang.String message, java.lang.String typeFlag, java.io.FileWriter out, int destination)
          Print a message with a type flag to a FileWriter.
static void println(java.lang.String message, java.lang.String typeFlag, java.io.PrintStream out, int destination)
          Print a message line with a type flag to a PrintStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONSOLE

public static final int CONSOLE
A destination flag indicating the console.

See Also:
Constant Field Values

LOG

public static final int LOG
A destination flag indicating logging.

See Also:
Constant Field Values
Constructor Detail

MessagePrinter

public MessagePrinter()
Method Detail

println

public static void println(java.lang.String message,
                           java.lang.String typeFlag,
                           java.io.PrintStream out,
                           int destination)
Print a message line with a type flag to a PrintStream.

Parameters:
message - the message to print
typeFlag - user-defined
out - (such as @{link java.lang.System.out System.out})
destination - destination flag (for choosing format)

print

public static void print(java.lang.String message,
                         java.lang.String typeFlag,
                         java.io.PrintStream out,
                         int destination)
Print a message (no linebreak) with a type flag to a PrintStream.

Parameters:
message - the message to print
typeFlag - user-defined
out - (such as @{link java.lang.System.out System.out})
destination - destination flag (for choosing format)

println

public static void println(java.lang.String message,
                           java.lang.String typeFlag,
                           java.io.FileWriter out,
                           int destination)
Print a message with a type flag to a FileWriter.

Parameters:
message - the message to print
out - the FileWriter to use
destination - destination flag (for choosing format)

gotLine

public static void gotLine()
Tells the MessagePrinter that we got an input; not midLine anymore.