java.lang.Object
java.util.Observable
org.vrspace.util.Connection
org.vrspace.util.BinaryConnection
org.vrspace.util.GZipConnection
- All Implemented Interfaces:
- java.lang.Runnable
- public class GZipConnection
- extends BinaryConnection
BinaryConnection that transfers GZIP comppressed data
Not tested, probably does not work :)
| Fields inherited from class org.vrspace.util.Connection |
active, host, in, inQueue, login, maxTries, out, outQueue, password, port, reader, reconnect, socket, TERMINATOR, tries, writer |
|
Method Summary |
java.io.OutputStream |
getOutputStream()
Returns the network output stream |
void |
run()
Interface java.lang.Runnable - reading from network |
void |
write(byte[] b)
Sends byte array to the network |
void |
write(byte[] b,
int offset,
int len)
Sends subset of byte array to the network |
| Methods inherited from class org.vrspace.util.Connection |
addObserver, close, getHostName, getHostPort, isActive, login, login, quit, read, reconnect, send, setMaxTries, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
output
java.util.zip.GZIPOutputStream output
input
java.util.zip.GZIPInputStream input
GZipConnection
public GZipConnection()
GZipConnection
public GZipConnection(java.lang.String host,
int port,
java.lang.String login,
java.lang.String password)
throws ConnectionException,
java.io.IOException
- Creates new GZipConnection to host:port and loggs in as login with password
GZipConnection
public GZipConnection(java.lang.String hostPort,
java.lang.String login,
java.lang.String password)
throws ConnectionException,
java.io.IOException
- Creates new GZipConnection to hostPort and loggs in as login with password, assuming that hostPort is "host:port" pair
getOutputStream
public java.io.OutputStream getOutputStream()
- Returns the network output stream
- Overrides:
getOutputStream in class BinaryConnection
write
public void write(byte[] b)
throws java.io.IOException
- Sends byte array to the network
- Overrides:
write in class BinaryConnection
write
public void write(byte[] b,
int offset,
int len)
throws java.io.IOException
- Sends subset of byte array to the network
- Overrides:
write in class BinaryConnection
run
public void run()
- Interface java.lang.Runnable - reading from network
- Specified by:
run in interface java.lang.Runnable- Overrides:
run in class BinaryConnection