Package ch.qos.logback.core.net
Class SyslogOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- ch.qos.logback.core.net.SyslogOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class SyslogOutputStream extends OutputStream
SyslogOutputStream is a wrapper around theDatagramSocketclass so that it behaves like anOutputStream.
-
-
Constructor Summary
Constructors Constructor Description SyslogOutputStream(String syslogHost, int port)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()intgetPort()voidwrite(byte[] byteArray, int offset, int len)voidwrite(int b)-
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
-
-
-
Constructor Detail
-
SyslogOutputStream
public SyslogOutputStream(String syslogHost, int port) throws UnknownHostException, SocketException
- Throws:
UnknownHostExceptionSocketException
-
-
Method Detail
-
write
public void write(byte[] byteArray, int offset, int len) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream
-
getPort
public int getPort()
-
write
public void write(int b) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
-