public class WrappedSocketConnection extends Object implements Closeable
| Constructor and Description |
|---|
WrappedSocketConnection(Socket socket) |
WrappedSocketConnection(Socket socket,
boolean useLargeOutputBuffer,
boolean useLargeInputBuffer) |
WrappedSocketConnection(String host,
int port) |
WrappedSocketConnection(String host,
int port,
boolean useLargeOutputBuffer,
boolean useLargeInputBuffer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
InetAddress |
getInetAddress() |
DataInputStream |
getIs() |
DataOutputStream |
getOs() |
Socket |
getSocket() |
boolean |
isDebug() |
boolean |
isOpen() |
boolean |
readBoolean() |
byte |
readByte() |
byte[] |
readByteArray() |
double |
readDouble() |
float |
readFloat() |
int |
readInt() |
long |
readLong() |
String |
readString() |
<T> T |
readValue(Class<T> objectClass) |
void |
setDebug(boolean debug) |
void |
writeBoolean(boolean value) |
void |
writeByte(byte value) |
void |
writeByteArray(byte[] bytes) |
void |
writeDouble(double value) |
void |
writeFloat(float value) |
void |
writeInt(int value) |
void |
writeLong(long value) |
void |
writeString(String message) |
<T> void |
writeValue(T value,
Class<T> objectClass) |
public WrappedSocketConnection(String host, int port) throws IOException
IOExceptionpublic WrappedSocketConnection(String host, int port, boolean useLargeOutputBuffer, boolean useLargeInputBuffer) throws IOException
IOExceptionpublic WrappedSocketConnection(Socket socket) throws IOException
IOExceptionpublic WrappedSocketConnection(Socket socket, boolean useLargeOutputBuffer, boolean useLargeInputBuffer) throws IOException
IOExceptionpublic boolean isDebug()
public void setDebug(boolean debug)
public DataInputStream getIs()
public DataOutputStream getOs()
public Socket getSocket()
public boolean isOpen()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void writeLong(long value)
throws IOException
IOExceptionpublic void writeInt(int value)
throws IOException
IOExceptionpublic long readLong()
throws IOException
IOExceptionpublic int readInt()
throws IOException
IOExceptionpublic double readDouble()
throws IOException
IOExceptionpublic void writeDouble(double value)
throws IOException
IOExceptionpublic void writeByte(byte value)
throws IOException
IOExceptionpublic byte readByte()
throws IOException
IOExceptionpublic void writeFloat(float value)
throws IOException
IOExceptionpublic float readFloat()
throws IOException
IOExceptionpublic <T> T readValue(Class<T> objectClass) throws IOException
IOExceptionpublic void flush()
throws IOException
IOExceptionpublic <T> void writeValue(T value,
Class<T> objectClass)
throws IOException
IOExceptionpublic byte[] readByteArray()
throws IOException
IOExceptionpublic String readString() throws IOException
IOExceptionpublic void writeByteArray(byte[] bytes)
throws IOException
IOExceptionpublic void writeString(String message) throws IOException
IOExceptionpublic boolean readBoolean()
throws IOException
IOExceptionpublic void writeBoolean(boolean value)
throws IOException
IOExceptionpublic InetAddress getInetAddress()
Copyright © 2015. All rights reserved.