|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.value.Transfer
public class Transfer
The transfer class is used to send and receive Value objects. It is used on both the client side, and on the server side.
Constructor Summary | |
---|---|
Transfer(SessionInterface session)
Create a new transfer object for the specified session. |
Method Summary | |
---|---|
void |
close()
Close the transfer object and the socket. |
void |
flush()
Write pending changes. |
java.net.Socket |
getSocket()
Get the socket. |
void |
init()
Initialize the transfer object. |
Transfer |
openNewConnection()
Open a new new connection to the same address and port as this one. |
boolean |
readBoolean()
Read a boolean. |
byte[] |
readBytes()
Read a byte array. |
int |
readInt()
Read an int. |
long |
readLong()
Read a long. |
java.lang.String |
readString()
Read a string. |
Value |
readValue()
Read a value. |
void |
setSession(SessionInterface session)
Set the session. |
void |
setSocket(java.net.Socket s)
Set the socket this object uses. |
void |
setSSL(boolean ssl)
Enable or disable SSL. |
void |
setVersion(int version)
|
Transfer |
writeBoolean(boolean x)
Write a boolean. |
Transfer |
writeBytes(byte[] data)
Write a byte array. |
Transfer |
writeInt(int x)
Write an int. |
Transfer |
writeLong(long x)
Write a long. |
Transfer |
writeString(java.lang.String s)
Write a string. |
void |
writeValue(Value v)
Write a value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Transfer(SessionInterface session)
session
- the sessionMethod Detail |
---|
public void setSocket(java.net.Socket s)
s
- the socketpublic void init() throws java.io.IOException
java.io.IOException
public void flush() throws java.io.IOException
java.io.IOException
public Transfer writeBoolean(boolean x) throws java.io.IOException
x
- the value
java.io.IOException
public boolean readBoolean() throws java.io.IOException
java.io.IOException
public Transfer writeInt(int x) throws java.io.IOException
x
- the value
java.io.IOException
public int readInt() throws java.io.IOException
java.io.IOException
public Transfer writeLong(long x) throws java.io.IOException
x
- the value
java.io.IOException
public long readLong() throws java.io.IOException
java.io.IOException
public Transfer writeString(java.lang.String s) throws java.io.IOException
s
- the value
java.io.IOException
public java.lang.String readString() throws java.io.IOException
java.io.IOException
public Transfer writeBytes(byte[] data) throws java.io.IOException
data
- the value
java.io.IOException
public byte[] readBytes() throws java.io.IOException
java.io.IOException
public void close()
public void writeValue(Value v) throws java.io.IOException
v
- the value
java.io.IOException
public Value readValue() throws java.io.IOException
java.io.IOException
public java.net.Socket getSocket()
public void setSession(SessionInterface session)
session
- the sessionpublic void setSSL(boolean ssl)
ssl
- the new valuepublic Transfer openNewConnection() throws java.io.IOException
java.io.IOException
public void setVersion(int version)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |