Quadcap Embeddable Server

com.quadcap.io.LogOutputStream Class Reference

Inheritance diagram for com.quadcap.io.LogOutputStream:

OutputStream List of all members.

Detailed Description

A filter output stream that tees off its output to a log file.

Author:
Stan Bailes

Definition at line 52 of file LogOutputStream.java.

Public Member Functions

 LogOutputStream (OutputStream os, OutputStream log, String prefix)
 Construct a new log output stream.

synchronized void write (int b) throws IOException
 Write a byte.

synchronized void write (byte[] b, int off, int len) throws IOException
 Write a buffer.

synchronized void write (byte[] b) throws IOException
 Write a buffer.

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

void flush () throws IOException
 Flush the underlying stream.


Package Attributes

OutputStream out
OutputStream log
byte[] prefix
boolean bol = true


Constructor & Destructor Documentation

com.quadcap.io.LogOutputStream.LogOutputStream OutputStream  os,
OutputStream  log,
String  prefix
 

Construct a new log output stream.

Parameters:
os the underlying output 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 66 of file LogOutputStream.java.


Member Function Documentation

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

Close the underlying stream and the log output stream.

Exceptions:
IOException may be thrown

Definition at line 116 of file LogOutputStream.java.

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

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

Flush the underlying stream.

Exceptions:
IOException may be thrown

Definition at line 126 of file LogOutputStream.java.

References com.quadcap.io.LogOutputStream.out.

synchronized void com.quadcap.io.LogOutputStream.write byte[]  b  )  throws IOException
 

Write a buffer.

Parameters:
b the buffer
Exceptions:
IOException may be thrown.

Definition at line 107 of file LogOutputStream.java.

synchronized void com.quadcap.io.LogOutputStream.write byte[]  b,
int  off,
int  len
throws IOException
 

Write a buffer.

Parameters:
b the buffer
off the index of the first byte in the buffer to write.
len the number of bytes to write.
Exceptions:
IOException may be thrown.

Definition at line 94 of file LogOutputStream.java.

synchronized void com.quadcap.io.LogOutputStream.write int  b  )  throws IOException
 

Write a byte.

Parameters:
b the byte.
Exceptions:
IOException may be thrown.

Definition at line 78 of file LogOutputStream.java.

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

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


Member Data Documentation

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

Definition at line 56 of file LogOutputStream.java.

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

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

Definition at line 54 of file LogOutputStream.java.

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

OutputStream com.quadcap.io.LogOutputStream.out [package]
 

Definition at line 53 of file LogOutputStream.java.

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

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

Definition at line 55 of file LogOutputStream.java.

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