Package com.db4o.cs.foundation
Class NetworkSocketBase
- java.lang.Object
-
- com.db4o.cs.foundation.NetworkSocketBase
-
- All Implemented Interfaces:
Socket4
- Direct Known Subclasses:
NetworkSocket
public abstract class NetworkSocketBase extends java.lang.Object implements Socket4
-
-
Constructor Summary
Constructors Constructor Description NetworkSocketBase(java.net.Socket socket)NetworkSocketBase(java.net.Socket socket, java.lang.String hostName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()protected abstract Socket4createParallelSocket(java.lang.String hostName, int port)voidflush()booleanisConnected()Socket4openParallelSocket()intread(byte[] a_bytes, int a_offset, int a_length)voidsetSoTimeout(int timeout)java.lang.StringtoString()voidwrite(byte[] bytes, int off, int len)
-
-
-
Method Detail
-
close
public void close() throws java.io.IOException
-
flush
public void flush() throws java.io.IOException
-
isConnected
public boolean isConnected()
- Specified by:
isConnectedin interfaceSocket4
-
read
public int read(byte[] a_bytes, int a_offset, int a_length) throws java.io.IOException
-
setSoTimeout
public void setSoTimeout(int timeout)
- Specified by:
setSoTimeoutin interfaceSocket4
-
write
public void write(byte[] bytes, int off, int len) throws java.io.IOException
-
openParallelSocket
public Socket4 openParallelSocket() throws java.io.IOException
- Specified by:
openParallelSocketin interfaceSocket4- Throws:
java.io.IOException
-
createParallelSocket
protected abstract Socket4 createParallelSocket(java.lang.String hostName, int port) throws java.io.IOException
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-