public abstract class UnixDomainSocket
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected class |
UnixDomainSocket.UnixDomainSocketInputStream |
protected class |
UnixDomainSocket.UnixDomainSocketOutputStream |
protected class |
UnixDomainSocket.UnixDomainSocketReadThread |
Modifier and Type | Field and Description |
---|---|
protected UnixDomainSocket.UnixDomainSocketInputStream |
in |
private static java.io.File |
jarFile |
protected int |
nativeSocketFileHandle |
protected UnixDomainSocket.UnixDomainSocketOutputStream |
out |
protected java.lang.String |
socketFile |
protected int |
socketType |
private int |
timeout |
Modifier | Constructor and Description |
---|---|
protected |
UnixDomainSocket() |
protected |
UnixDomainSocket(int pSocketFileHandle,
int pSocketType) |
Modifier and Type | Method and Description |
---|---|
private static java.lang.String |
arch() |
void |
close()
Closes the socket
|
private static void |
extractNativeLib(java.io.File target) |
java.io.InputStream |
getInputStream()
Returns an input stream for this socket.
|
private static void |
getJarPath() |
private static java.io.File |
getNativeLibTarget() |
java.io.OutputStream |
getOutputStream()
Returns an output stream for this socket.
|
int |
getTimeout() |
private static java.lang.Boolean |
jarNewer(java.io.File lib) |
private static void |
loadNativeLib() |
protected static int |
nativeAccept(int nativeSocketFileHandle,
int socketType) |
protected static int |
nativeClose(int nativeSocketFileHandle) |
protected static int |
nativeCloseInput(int nativeSocketFileHandle) |
protected static int |
nativeCloseOutput(int nativeSocketFileHandle) |
protected static int |
nativeCreate(java.lang.String socketFile,
int socketType) |
protected static int |
nativeListen(java.lang.String socketFile,
int socketType,
int backlog) |
protected static int |
nativeOpen(java.lang.String socketFile,
int socketType) |
protected static int |
nativeRead(int nativeSocketFileHandle,
byte[] b,
int off,
int len) |
protected static int |
nativeUnlink(java.lang.String socketFile) |
protected static int |
nativeWrite(int nativeSocketFileHandle,
byte[] b,
int off,
int len) |
private static java.lang.String |
platform() |
void |
setTimeout(int timeout)
Sets the read timeout for the socket.
|
private static void |
throwLink(java.lang.String s) |
private static void |
throwLink(java.lang.Throwable e) |
void |
unlink()
Unlink socket file
|
private static java.io.File jarFile
protected UnixDomainSocket.UnixDomainSocketInputStream in
protected UnixDomainSocket.UnixDomainSocketOutputStream out
protected int nativeSocketFileHandle
protected java.lang.String socketFile
protected int socketType
private int timeout
protected UnixDomainSocket()
protected UnixDomainSocket(int pSocketFileHandle, int pSocketType) throws java.io.IOException
java.io.IOException
private static void getJarPath()
private static void loadNativeLib() throws java.io.IOException
java.io.IOException
private static java.lang.Boolean jarNewer(java.io.File lib)
private static void throwLink(java.lang.Throwable e)
private static void throwLink(java.lang.String s)
private static java.io.File getNativeLibTarget() throws java.io.IOException
java.io.IOException
private static void extractNativeLib(java.io.File target) throws java.io.IOException, java.net.URISyntaxException
java.io.IOException
java.net.URISyntaxException
private static java.lang.String arch()
private static java.lang.String platform()
protected static int nativeCreate(java.lang.String socketFile, int socketType)
protected static int nativeListen(java.lang.String socketFile, int socketType, int backlog)
protected static int nativeAccept(int nativeSocketFileHandle, int socketType)
protected static int nativeOpen(java.lang.String socketFile, int socketType)
protected static int nativeRead(int nativeSocketFileHandle, byte[] b, int off, int len)
protected static int nativeWrite(int nativeSocketFileHandle, byte[] b, int off, int len)
protected static int nativeClose(int nativeSocketFileHandle)
protected static int nativeCloseInput(int nativeSocketFileHandle)
protected static int nativeCloseOutput(int nativeSocketFileHandle)
protected static int nativeUnlink(java.lang.String socketFile)
public java.io.InputStream getInputStream()
public java.io.OutputStream getOutputStream()
public void setTimeout(int timeout)
timeout
of zero is interpreted as an infinite timeout.timeout
- The specified timeout, in milliseconds.public int getTimeout()
public void close()
public void unlink()