Quadcap Embeddable Server

com.quadcap.io.LogWriter Class Reference

Inheritance diagram for com.quadcap.io.LogWriter:

Writer List of all members.

Detailed Description

A filter writer that tees off output into a log file, with a prefix identifying the stream.

Author:
Stan Bailes

Definition at line 55 of file LogWriter.java.

Public Member Functions

 LogWriter (Writer out, Writer log, String prefix)
 Construct a new log reader.

synchronized void write (int c) throws IOException
 Read (and log) a byte.

void write (char[] cbuf, int off, int len) throws IOException
 Read (and log) an array of bytes.

void flush () throws IOException
 Flush the underlying stream(s).

void close () throws IOException
 Close the underlying stream (but not the log stream!).


Package Attributes

Writer out
Writer log
String prefix
boolean bol = true


Constructor & Destructor Documentation

com.quadcap.io.LogWriter.LogWriter Writer  out,
Writer  log,
String  prefix
 

Construct a new log reader.

Parameters:
is the underlying reader
log the log stream
prefix a string identifying this log stream to be prefixed to every line output by this filter.

Definition at line 69 of file LogWriter.java.


Member Function Documentation

void com.quadcap.io.LogWriter.close  )  throws IOException
 

Close the underlying stream (but not the log stream!).

Exceptions:
IOException may be thrown

Definition at line 109 of file LogWriter.java.

References com.quadcap.io.LogWriter.out.

void com.quadcap.io.LogWriter.flush  )  throws IOException
 

Flush the underlying stream(s).

Definition at line 99 of file LogWriter.java.

References com.quadcap.io.LogWriter.log, and com.quadcap.io.LogWriter.out.

void com.quadcap.io.LogWriter.write char[]  cbuf,
int  off,
int  len
throws IOException
 

Read (and log) an array of bytes.

Definition at line 90 of file LogWriter.java.

synchronized void com.quadcap.io.LogWriter.write int  c  )  throws IOException
 

Read (and log) a byte.

Exceptions:
IOException may be thrown

Definition at line 80 of file LogWriter.java.

References com.quadcap.io.LogWriter.bol, com.quadcap.io.LogWriter.log, com.quadcap.io.LogWriter.out, com.quadcap.io.LogWriter.prefix, and com.quadcap.io.LogWriter.write().

Referenced by com.quadcap.io.LogWriter.write().


Member Data Documentation

boolean com.quadcap.io.LogWriter.bol = true [package]
 

Definition at line 59 of file LogWriter.java.

Referenced by com.quadcap.io.LogWriter.write().

Writer com.quadcap.io.LogWriter.log [package]
 

Definition at line 57 of file LogWriter.java.

Referenced by com.quadcap.io.LogWriter.flush(), and com.quadcap.io.LogWriter.write().

Writer com.quadcap.io.LogWriter.out [package]
 

Definition at line 56 of file LogWriter.java.

Referenced by com.quadcap.io.LogWriter.close(), com.quadcap.io.LogWriter.flush(), and com.quadcap.io.LogWriter.write().

String com.quadcap.io.LogWriter.prefix [package]
 

Definition at line 58 of file LogWriter.java.

Referenced by com.quadcap.io.LogWriter.write().