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
IOExceptionpublic PacketChannel(Socket socket) throws IOException
IOExceptionpublic ByteArrayInputStream getInputStream()
public ByteArrayOutputStream getOutputStream()
public byte[] read()
throws IOException
IOExceptionpublic void write(Command command, int packetNumber) throws IOException
IOException@Deprecated public void writeBuffered(Command command, int packetNumber) throws IOException
write(Command, int) insteadIOExceptionpublic void write(Command command) throws IOException
IOExceptionpublic void upgradeToSSL(SSLSocketFactory sslSocketFactory, HostnameVerifier hostnameVerifier) throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ChannelIOExceptionCopyright © 2019. All rights reserved.