|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--gnu.net.local.AfUnixSocket
This class models a client side AF_UNIX socket. An AF_UNIX socket is a local endpoint for network communications conceptually similar to a file handle.
To use this library you have to include the native library 'libgnu_net_localX.so' in your LD_LIBRARY_PATH
If you want to check whether the AF_UNIX native library can be loaded/used at all before creating a socket try AfUnixSocketImpl.loadNativeLibrary() and catch UnsatisfiedLinkError.
| Constructor Summary | |
AfUnixSocket()
Initializes a new instance of AfUnixSocket object without
connecting. |
|
AfUnixSocket(java.lang.String sockname)
Initializes a new instance of AfUnixSocket and connects to the
socket specified as arguments. |
|
| Method Summary | |
void |
close()
Closes the Socket |
java.io.InputStream |
getInputStream()
Returns an InputStream for reading from this socket. |
java.io.OutputStream |
getOutputStream()
Returns an OutputStream for writing to this socket. |
java.lang.String |
toString()
Converts this AfUnixSocket to a String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AfUnixSocket()
AfUnixSocket object without
connecting. This useful for subclasses of socket that
might want this behavior.
java.lang.UnsatisfiedLinkError - loads the native library- throws UnsatisfiedLinkError on failure
public AfUnixSocket(java.lang.String sockname)
throws java.io.IOException
AfUnixSocket and connects to the
socket specified as arguments.
sockname - The name of the socket to connect to
java.io.IOException - If an error occurs
java.lang.UnsatisfiedLinkError - loads the native libraray - throws UnsatisfiedLinkError on failure| Method Detail |
public java.io.InputStream getInputStream()
throws java.io.IOException
java.io.IOException - If an error occurs or Socket is not connected
public java.io.OutputStream getOutputStream()
throws java.io.IOException
java.io.IOException - If an error occurs or Socket is not connected
public void close()
throws java.io.IOException
java.io.IOException - If an error occurspublic java.lang.String toString()
AfUnixSocket to a String.
toString in class java.lang.ObjectString representation of this Socket
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||