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 the `DatagramSocket` class so that it behaves like an `OutputStream`.

## Constructor Summary

Constructors
Constructor
Description
`SyslogOutputStream(String syslogHost, int port)`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`void`
`flush()`
`int`
`getPort()`
`void`
`write(byte[] byteArray, int offset, int len)`
`void`
`write(int b)`

### Methods inherited from class java.io.OutputStream

`nullOutputStream, write`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SyslogOutputStream

public SyslogOutputStream(String syslogHost, int port) throws UnknownHostException, SocketException

Throws:
  `UnknownHostException`
  `SocketException`

## Method Details

### write

public void write(byte[] byteArray, int offset, int len) throws IOException

Overrides:
  `write` in class `OutputStream`
Throws:
  `IOException`

### flush

public void flush() throws IOException

Specified by:
  `flush` in interface `Flushable`
Overrides:
  `flush` in class `OutputStream`
Throws:
  `IOException`

### close

public void close()

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Overrides:
  `close` in class `OutputStream`

### getPort

public int getPort()

### write

public void write(int b) throws IOException

Specified by:
  `write` in class `OutputStream`
Throws:
  `IOException`