kr.co.hit.live.log.io
Class LogOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by kr.co.hit.live.log.io.LogOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class LogOutputStream
extends OutputStream

Logger 파일로 Stream 방식의 출력을 하고자 할때 사용할 수 있도록 OutputStream을 구현한 클래스이다.

Author:
김형도

Field Summary
protected  byte[] buffer
           
protected  int bufferSize
           
protected  int count
           
static int DEFAULT_BUFFER_SIZE
           
protected  boolean isClosed
           
protected  org.slf4j.Logger outputLog
           
protected  LogLevel outputLogLevel
           
 
Constructor Summary
LogOutputStream(org.slf4j.Logger log, LogLevel level)
           
 
Method Summary
 void close()
           
 void flush()
           
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_BUFFER_SIZE

public static final int DEFAULT_BUFFER_SIZE
See Also:
Constant Field Values

buffer

protected byte[] buffer

bufferSize

protected int bufferSize

count

protected int count

isClosed

protected boolean isClosed

outputLog

protected org.slf4j.Logger outputLog

outputLogLevel

protected LogLevel outputLogLevel
Constructor Detail

LogOutputStream

public LogOutputStream(org.slf4j.Logger log,
                       LogLevel level)
Method Detail

close

public void close()
Specified by:
close in interface Closeable
Overrides:
close in class OutputStream

write

public void write(int b)
           throws IOException
Specified by:
write in class OutputStream
Throws:
IOException

flush

public void flush()
Specified by:
flush in interface Flushable
Overrides:
flush in class OutputStream


Copyright © 2014. All Rights Reserved.