public class LogOutputStream extends OutputStream
| Constructor and Description |
|---|
LogOutputStream(File file)
Creates an OutputStream.
|
LogOutputStream(File file,
int max)
Creates an OutputStream.
|
LogOutputStream(String s)
Creates an OutputStream.
|
LogOutputStream(String s,
int max)
Creates an OutputStream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the stream.
|
protected void |
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
void |
flush() |
void |
write(byte[] bytes)
Writes a byte[] to the output stream.
|
void |
write(byte[] bytes,
int ofs,
int cnt)
Writes a byte array to the stream.
|
void |
write(int ch)
Writes a character/byte to the output stream.
|
public LogOutputStream(File file)
file - Log file to be appendedpublic LogOutputStream(File file, int max)
file - Log file to be appendedmax - Suggests a maximum file sizepublic LogOutputStream(String s)
s - String specifying a log file to be appendedpublic LogOutputStream(String s, int max)
s - String specifying a log file to be appendedmax - Suggests a maximum file sizepublic void close()
close in class OutputStreamprotected void finalize()
Objectfinalize method to dispose of
system resources or to perform other cleanup.
Any exception thrown by the finalize method causes
the finalization of this object to be halted, but is otherwise
ignored.
The finalize method in Object does
nothing.
public void flush()
throws IOException
flush in class OutputStreamIOException - ?public void write(int ch)
throws IOException
write in class OutputStreamch - character to be written?IOExceptionpublic void write(byte[] bytes)
throws IOException
write in class OutputStreambytes - Array of bytes to be writtenIOExceptionpublic void write(byte[] bytes,
int ofs,
int cnt)
throws IOException
write in class OutputStreambytes - array of bytes containing the data to be written.?ofs - Offset into the byte array locating the datacnt - Count of bytes from the array to be written.IOException