Quadcap Embeddable Server

com.quadcap.io.LogReader Class Reference

Inheritance diagram for com.quadcap.io.LogReader:

Reader List of all members.

Detailed Description

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

Author:
Stan Bailes

Definition at line 55 of file LogReader.java.

Public Member Functions

 LogReader (Reader in, Writer log, String prefix)
 Construct a new log reader.

synchronized int read () throws IOException
 Read (and log) a byte.

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

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


Package Attributes

Reader in
Writer log
String prefix
boolean bol = true


Constructor & Destructor Documentation

com.quadcap.io.LogReader.LogReader Reader  in,
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 LogReader.java.


Member Function Documentation

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

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

Exceptions:
IOException may be thrown

Definition at line 107 of file LogReader.java.

References com.quadcap.io.LogReader.in.

int com.quadcap.io.LogReader.read char[]  cbuf,
int  off,
int  len
throws IOException
 

Read (and log) an array of bytes.

Definition at line 93 of file LogReader.java.

References com.quadcap.io.LogReader.read().

synchronized int com.quadcap.io.LogReader.read  )  throws IOException
 

Read (and log) a byte.

Exceptions:
IOException may be thrown

Definition at line 80 of file LogReader.java.

References com.quadcap.io.LogReader.bol, com.quadcap.io.LogReader.in, com.quadcap.io.LogReader.log, and com.quadcap.io.LogReader.prefix.

Referenced by com.quadcap.io.LogReader.read().


Member Data Documentation

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

Definition at line 59 of file LogReader.java.

Referenced by com.quadcap.io.LogReader.read().

Reader com.quadcap.io.LogReader.in [package]
 

Definition at line 56 of file LogReader.java.

Referenced by com.quadcap.io.LogReader.close(), and com.quadcap.io.LogReader.read().

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

Definition at line 57 of file LogReader.java.

Referenced by com.quadcap.io.LogReader.read().

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

Definition at line 58 of file LogReader.java.

Referenced by com.quadcap.io.LogReader.read().