diff --git a/java/com/tigervnc/network/FileDescriptor.java b/java/com/tigervnc/network/FileDescriptor.java
index e2d04fa..28ea96b 100644
--- a/java/com/tigervnc/network/FileDescriptor.java
+++ b/java/com/tigervnc/network/FileDescriptor.java
@@ -18,14 +18,14 @@
  */
 package com.tigervnc.network;
 
-import java.lang.Exception;
 import java.io.IOException;
+import com.tigervnc.rdr.Exception;
 
 public interface FileDescriptor {
     
-  public int read(byte[] buf, int bufPtr, int length) throws java.lang.Exception;
-  public int write(byte[] buf, int bufPtr, int length) throws java.lang.Exception;
-  public int select(int interestOps, int timeout) throws java.lang.Exception;
+  public int read(byte[] buf, int bufPtr, int length) throws Exception;
+  public int write(byte[] buf, int bufPtr, int length) throws Exception;
+  public int select(int interestOps, int timeout) throws Exception;
   public void close() throws IOException;
 
 }
diff --git a/java/com/tigervnc/network/SocketDescriptor.java b/java/com/tigervnc/network/SocketDescriptor.java
index 375b033..1998ca5 100644
--- a/java/com/tigervnc/network/SocketDescriptor.java
+++ b/java/com/tigervnc/network/SocketDescriptor.java
@@ -19,7 +19,6 @@
 package com.tigervnc.network;
 
 import java.io.IOException;
-import java.lang.Exception;
 
 import java.net.SocketAddress;
 import java.nio.*;
@@ -29,6 +28,8 @@
 import java.util.Set;
 import java.util.Iterator;
 
+import com.tigervnc.rdr.Exception;
+
 public class SocketDescriptor extends SocketChannel 
                               implements FileDescriptor {
 
@@ -38,7 +39,7 @@
       channel = SocketChannel.open();
       channel.configureBlocking(false);
       selector = Selector.open();
-    } catch (java.io.IOException e) {
+    } catch (IOException e) {
       throw new Exception(e.toString());
     }
     try {
@@ -54,11 +55,10 @@
     try {
       n = channel.read(b);
     } catch (java.io.IOException e) {
-      System.out.println(e.toString());
       throw new Exception(e.toString());
     }
-    //if (n == 0)
-    //  throw new Exception;
+    if (n <= 0)
+      return (n == 0) ? -1 : 0;
     b.flip();
     b.get(buf, bufPtr, n);
     b.clear();
@@ -74,7 +74,6 @@
     try {
       n = channel.write(b);
     } catch (java.io.IOException e) {
-      System.out.println(e.toString());
       throw new Exception(e.toString());
     }
     b.clear();
@@ -85,8 +84,7 @@
     int n;
     try {
       n = selector.select(timeout);
-    } catch (Exception e) {
-      System.out.println(e.toString());
+    } catch (java.io.IOException e) {
       throw new Exception(e.toString());
     }
     Set keys = selector.selectedKeys();
@@ -104,13 +102,12 @@
     return n;
   }
 
-  public int write(ByteBuffer buf) throws IOException {
+  public int write(ByteBuffer buf) throws Exception {
     int n = 0;
     try {
       n = channel.write(buf);
     } catch (java.io.IOException e) {
-      System.out.println(e.toString());
-      throw e;
+      throw new Exception(e.toString());
     }
     return n;
   }
@@ -122,7 +119,7 @@
     try {
       n = channel.write(buf, offset, length);
     } catch (java.io.IOException e) {
-      System.out.println(e.toString());
+      throw new Exception(e.toString());
     }
     return n;
   }
@@ -132,8 +129,7 @@
     try {
       n = channel.read(buf);
     } catch (java.io.IOException e) {
-      System.out.println(e.toString());
-      throw e;
+      throw new Exception(e.toString());
     }
     return n;
   }
@@ -145,7 +141,7 @@
     try {
       n = channel.read(buf, offset, length);
     } catch (java.io.IOException e) {
-      System.out.println(e.toString());
+      throw new Exception(e.toString());
     }
     return n;
   }
diff --git a/java/com/tigervnc/network/SocketException.java b/java/com/tigervnc/network/SocketException.java
new file mode 100644
index 0000000..6f795f9
--- /dev/null
+++ b/java/com/tigervnc/network/SocketException.java
@@ -0,0 +1,28 @@
+/* Copyright (C) 2012 TigerVNC Team
+ * 
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this software; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
+ * USA.
+ */
+
+package com.tigervnc.network;
+
+import com.tigervnc.rdr.SystemException;
+
+public class SocketException extends SystemException {
+  public SocketException(String s) {
+    super(s);
+  }
+}
+
diff --git a/java/com/tigervnc/network/TcpSocket.java b/java/com/tigervnc/network/TcpSocket.java
index 926aa97..9277dd1 100644
--- a/java/com/tigervnc/network/TcpSocket.java
+++ b/java/com/tigervnc/network/TcpSocket.java
@@ -21,13 +21,13 @@
 
 import com.tigervnc.rdr.FdInStream;
 import com.tigervnc.rdr.FdOutStream;
+import com.tigervnc.rdr.Exception;
 import com.tigervnc.rfb.LogWriter;
 
 import java.io.IOException;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.net.SocketAddress;
-import java.net.SocketException;
 import java.net.UnknownHostException;
 import java.nio.*;
 import java.nio.channels.*;
@@ -46,7 +46,6 @@
 
   public TcpSocket(SocketDescriptor sock, boolean close) {
     super(new FdInStream(sock), new FdOutStream(sock), true);
-    //this.sock = sock;
     closeFd = close;
   }
 
@@ -71,30 +70,29 @@
 
     try {
       sock = new SocketDescriptor();
-    } catch(UnknownHostException e) {
-      throw new Exception("unable to create socket: "+e.toString());
+    } catch(Exception e) {
+      throw new SocketException("unable to create socket: "+e.toString());
     }
 
     /* Attempt to connect to the remote host */
     try {
       result = sock.connect(new InetSocketAddress(addr, port));
     } catch(java.io.IOException e) {
-      //throw new java.lang.Exception(e.getMessage());
-      System.out.println("connect failed: "+e.getMessage());
+      throw new SocketException("unable to connect:"+e.getMessage());
     }
 
     if (!result && sock.isConnectionPending()) {
       while (!result) {
         try {
           result = sock.finishConnect();
-        } catch(java.nio.channels.ClosedChannelException e) {
+        } catch(java.io.IOException e) {
           throw new Exception(e.getMessage());
         }
       }
     }
 
     if (!result)
-      throw new Exception("unable connect to socket");
+      throw new SocketException("unable connect to socket");
 
     // Disable Nagle's algorithm, to reduce latency
     enableNagles(sock, false);
@@ -154,8 +152,8 @@
   public static boolean enableNagles(SocketChannel sock, boolean enable) {
     try {
       sock.socket().setTcpNoDelay(!enable);
-    } catch(SocketException e) {
-      vlog.error(e.getMessage());
+    } catch(java.net.SocketException e) {
+      vlog.error("unable to setsockopt TCP_NODELAY: "+e.getMessage());
       return false;
     }
     return true;
diff --git a/java/com/tigervnc/rdr/Exception.java b/java/com/tigervnc/rdr/Exception.java
index a5fe938..a2f8833 100644
--- a/java/com/tigervnc/rdr/Exception.java
+++ b/java/com/tigervnc/rdr/Exception.java
@@ -23,3 +23,15 @@
     super(s);
   }
 }
+
+class TimedOut extends Exception {
+  public TimedOut() {
+    super("Timed out");
+  }
+}
+
+class FrameException extends Exception {
+  public FrameException() {
+    super("Frame Exception");
+  }
+}
diff --git a/java/com/tigervnc/rdr/FdInStream.java b/java/com/tigervnc/rdr/FdInStream.java
index c638f4b..245a634 100644
--- a/java/com/tigervnc/rdr/FdInStream.java
+++ b/java/com/tigervnc/rdr/FdInStream.java
@@ -153,24 +153,22 @@
 
       try {
         n = fd.select(SelectionKey.OP_READ, timeoutms);
-      } catch (java.lang.Exception e) {
-        System.out.println(e.toString());
-        throw new Exception(e.toString());
+      } catch (Exception e) {
+        throw new SystemException("select:"+e.toString());
       }
         
           
       if (n > 0) break;
       if (!wait) return 0;
-      //if (blockCallback == null) throw TimedOut();
+      if (blockCallback == null) throw new TimedOut();
     
       blockCallback.blockCallback();
     }
 
     try {
       n = fd.read(buf, bufPtr, len);
-    } catch (java.lang.Exception e) {
-      System.out.println("read:"+e.toString());
-      throw new Exception(e.toString());
+    } catch (Exception e) {
+      throw new SystemException("read:"+e.toString());
     }
 
     if (n == 0) throw new EndOfStream();
diff --git a/java/com/tigervnc/rdr/SystemException.java b/java/com/tigervnc/rdr/SystemException.java
new file mode 100644
index 0000000..e3df263
--- /dev/null
+++ b/java/com/tigervnc/rdr/SystemException.java
@@ -0,0 +1,26 @@
+/* Copyright (C) 2012 TigerVNC Team
+ * 
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this software; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
+ * USA.
+ */
+
+package com.tigervnc.rdr;
+
+public class SystemException extends Exception {
+  public SystemException(String s) {
+    super(s);
+  }
+}
+
