public class UnixClient {
public static void main(String[] args) throws IOException {
java.io.File path = new java.io.File("/tmp/fubar.sock");
String data = "blah blah";
UnixSocketAddress address = new UnixSocketAddress(path);
UnixSocketChannel channel = UnixSocketChannel.open(address);
System.out.println("connected to " + channel.getRemoteSocketAddress());
PrintWriter w = new PrintWriter(Channels.newOutputStream(channel));
w.print(data);
w.flush();
InputStreamReader r = new InputStreamReader(Channels.newInputStream(channel));