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 void
close()
void
flush()
void
write(byte[] bytes)
void
write(byte[] bytes, int offset, int length)
void
write(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:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(int i) throws IOException
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(byte[] bytes) throws IOException
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
-