org.apache.logging.log4j.core.net
Class DatagramOutputStream
java.lang.Object
java.io.OutputStream
org.apache.logging.log4j.core.net.DatagramOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class DatagramOutputStream
- extends OutputStream
OutputStream for UDP connections.
Field Summary |
protected static Logger |
LOGGER
Allow subclasses access to the status logger without creating another instance. |
Method Summary |
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.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGGER
protected static final Logger LOGGER
- Allow subclasses access to the status logger without creating another instance.
DatagramOutputStream
public DatagramOutputStream(String host,
int port)
- The Constructor.
- Parameters:
host
- The host to connect to.port
- The port on the host.
write
public void write(byte[] bytes,
int offset,
int length)
throws IOException
- Overrides:
write
in class OutputStream
- Throws:
IOException
write
public void write(int i)
throws IOException
- Specified by:
write
in class OutputStream
- Throws:
IOException
write
public void write(byte[] bytes)
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()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class OutputStream
- Throws:
IOException
Copyright © 1999-2012 Apache Software Foundation. All Rights Reserved.