Quadcap Embeddable Server

com.quadcap.io.LogInputStream Class Reference

Inheritance diagram for com.quadcap.io.LogInputStream:

InputStream List of all members.

Detailed Description

A filter input stream that tees off input into a log file, with an optional prefix for each line (delimited by newline), which can be used to identify the stream.

Author:
Stan Bailes

Definition at line 54 of file LogInputStream.java.

Public Member Functions

 LogInputStream (InputStream is, OutputStream log, String prefix)
 Construct a new log input stream.

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

void close () throws IOException
 Close the underlying stream and the log output stream.


Package Attributes

InputStream in
OutputStream log
byte[] prefix
boolean bol = true


Constructor & Destructor Documentation

com.quadcap.io.LogInputStream.LogInputStream InputStream  is,
OutputStream  log,
String  prefix
 

Construct a new log input stream.

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

Definition at line 68 of file LogInputStream.java.


Member Function Documentation

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

Close the underlying stream and the log output stream.

Exceptions:
IOException may be thrown

Definition at line 92 of file LogInputStream.java.

References com.quadcap.io.LogInputStream.in, and com.quadcap.io.LogInputStream.log.

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

Read (and log) a byte.

Exceptions:
IOException may be thrown

Definition at line 79 of file LogInputStream.java.

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


Member Data Documentation

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

Definition at line 58 of file LogInputStream.java.

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

InputStream com.quadcap.io.LogInputStream.in [package]
 

Definition at line 55 of file LogInputStream.java.

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

OutputStream com.quadcap.io.LogInputStream.log [package]
 

Definition at line 56 of file LogInputStream.java.

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

byte [] com.quadcap.io.LogInputStream.prefix [package]
 

Definition at line 57 of file LogInputStream.java.

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