Class DatagramOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.apache.logging.log4j.core.net.DatagramOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class DatagramOutputStream extends OutputStream
OutputStream for UDP connections.
-
-
Constructor Summary
Constructors Constructor Description DatagramOutputStream(String host, int port, byte[] header, byte[] footer)The Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()voidwrite(byte[] bytes)voidwrite(byte[] bytes, int offset, int length)voidwrite(int i)-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Field Detail
-
LOGGER
protected static final Logger LOGGER
Allow subclasses access to the status logger without creating another instance.
-
-
Constructor Detail
-
DatagramOutputStream
public DatagramOutputStream(String host, int port, byte[] header, byte[] footer)
The Constructor.- Parameters:
host- The host to connect to.port- The port on the host.
-
-
Method Detail
-
write
public void write(byte[] bytes, int offset, int length) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(int i) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] bytes) 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() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
-