public class ActiveSocketOutputStream extends OutputStream
OutputStream
that connects to a remote server and sends all data to that server. If the connection
cannot be established or breaks, the data is silently discarded, but reconnection attempts are made every now and
then.Constructor and Description |
---|
ActiveSocketOutputStream(InetAddress addr,
int port) |
ActiveSocketOutputStream(InetSocketAddress remoteAddress) |
ActiveSocketOutputStream(InetSocketAddress remoteAddress,
InetSocketAddress localAddress) |
ActiveSocketOutputStream(String hostname,
int port) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
flush, write
public ActiveSocketOutputStream(@NotNull InetAddress addr, int port)
public ActiveSocketOutputStream(@NotNull InetSocketAddress remoteAddress)
public ActiveSocketOutputStream(@NotNull InetSocketAddress remoteAddress, @Nullable InetSocketAddress localAddress)
remoteAddress
- See Socket.connect(java.net.SocketAddress)
localAddress
- See Socket.bind(java.net.SocketAddress)
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
Copyright © 2018 Arno Unkrig. All rights reserved.