Class DatagramOutputStream
java.lang.Object
java.io.OutputStream
org.apache.logging.log4j.core.net.DatagramOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
OutputStream for UDP connections.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]
private DatagramSocket
private final byte[]
private final byte[]
private final InetAddress
protected static final Logger
Allow subclasses access to the status logger without creating another instance.private final int
private static final int
private static final int
private static final int
-
Constructor Summary
ConstructorsConstructorDescriptionDatagramOutputStream
(String host, int port, byte[] header, byte[] footer) The Constructor. -
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
LOGGER
Allow subclasses access to the status logger without creating another instance. -
SHIFT_1
private static final int SHIFT_1- See Also:
-
SHIFT_2
private static final int SHIFT_2- See Also:
-
SHIFT_3
private static final int SHIFT_3- See Also:
-
datagramSocket
-
inetAddress
-
port
private final int port -
data
private byte[] data -
header
private final byte[] header
-
-
Constructor Details
-
DatagramOutputStream
The Constructor.- Parameters:
host
- The host to connect to.port
- The port on the host.
-
-
Method Details
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
copy
private void copy(byte[] bytes, int offset, int length)
-