public class PacketChannel extends Object implements Channel
Constructor and Description |
---|
PacketChannel(Socket socket) |
PacketChannel(String hostname,
int port) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
ByteArrayInputStream |
getInputStream() |
ByteArrayOutputStream |
getOutputStream() |
boolean |
isOpen() |
byte[] |
read() |
void |
upgradeToSSL(SSLSocketFactory sslSocketFactory,
HostnameVerifier hostnameVerifier) |
void |
write(Command command) |
void |
write(Command command,
int packetNumber) |
void |
writeBuffered(Command command,
int packetNumber)
Deprecated.
use
write(Command, int) instead |
public PacketChannel(String hostname, int port) throws IOException
IOException
public PacketChannel(Socket socket) throws IOException
IOException
public ByteArrayInputStream getInputStream()
public ByteArrayOutputStream getOutputStream()
public byte[] read() throws IOException
IOException
public void write(Command command, int packetNumber) throws IOException
IOException
@Deprecated public void writeBuffered(Command command, int packetNumber) throws IOException
write(Command, int)
insteadIOException
public void write(Command command) throws IOException
IOException
public void upgradeToSSL(SSLSocketFactory sslSocketFactory, HostnameVerifier hostnameVerifier) throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Channel
IOException
Copyright © 2020. All rights reserved.