diff --git a/lib/java/src/TApplicationException.java b/lib/java/src/TApplicationException.java
index 0890282..b9c0d3d 100644
--- a/lib/java/src/TApplicationException.java
+++ b/lib/java/src/TApplicationException.java
@@ -20,7 +20,7 @@
   public static final int BAD_SEQUENCE_ID = 4;
   public static final int MISSING_RESULT = 5;
 
-  protected int type_ = 0;
+  protected int type_ = UNKNOWN;
 
   public TApplicationException() {
     super();
diff --git a/lib/java/src/transport/TIOStreamTransport.java b/lib/java/src/transport/TIOStreamTransport.java
index aa4adf1..a32195b 100644
--- a/lib/java/src/transport/TIOStreamTransport.java
+++ b/lib/java/src/transport/TIOStreamTransport.java
@@ -99,12 +99,12 @@
    */
   public int read(byte[] buf, int off, int len) throws TTransportException {
     if (inputStream_ == null) {
-      throw new TTransportException("Cannot read from null inputStream");
+      throw new TTransportException(TTransportException.NOT_OPEN, "Cannot read from null inputStream");
     }
     try {
       return inputStream_.read(buf, off, len);
     } catch (IOException iox) {
-      throw new TTransportException(iox);
+      throw new TTransportException(TTransportException.UNKNOWN, iox);
     }
   }
 
@@ -113,12 +113,12 @@
    */
   public void write(byte[] buf, int off, int len) throws TTransportException {
     if (outputStream_ == null) {
-      throw new TTransportException("Cannot write to null outputStream");
+      throw new TTransportException(TTransportException.NOT_OPEN, "Cannot write to null outputStream");
     }
     try {
       outputStream_.write(buf, off, len);
     } catch (IOException iox) {
-      throw new TTransportException(iox);
+      throw new TTransportException(TTransportException.UNKNOWN, iox);
     }
   }
 
@@ -127,12 +127,12 @@
    */
   public void flush() throws TTransportException {
     if (outputStream_ == null) {
-      throw new TTransportException("Cannot flush null outputStream");
+      throw new TTransportException(TTransportException.NOT_OPEN, "Cannot flush null outputStream");
     }
     try {
       outputStream_.flush();
     } catch (IOException iox) {
-      throw new TTransportException(iox);
+      throw new TTransportException(TTransportException.UNKNOWN, iox);
     }
   }
 }
diff --git a/lib/java/src/transport/TServerSocket.java b/lib/java/src/transport/TServerSocket.java
index ab2b5e7..6cbd0c1 100644
--- a/lib/java/src/transport/TServerSocket.java
+++ b/lib/java/src/transport/TServerSocket.java
@@ -82,7 +82,7 @@
   
   protected TSocket acceptImpl() throws TTransportException {
     if (serverSocket_ == null) {
-      throw new TTransportException("No underlying server socket.");
+      throw new TTransportException(TTransportException.NOT_OPEN, "No underlying server socket.");
     }
     try {
       Socket result = serverSocket_.accept();
diff --git a/lib/java/src/transport/TSocket.java b/lib/java/src/transport/TSocket.java
index 4922b04..a2aa233 100644
--- a/lib/java/src/transport/TSocket.java
+++ b/lib/java/src/transport/TSocket.java
@@ -55,7 +55,7 @@
         outputStream_ = new BufferedOutputStream(socket_.getOutputStream(), 1024);
       } catch (IOException iox) {
         close();
-        throw new TTransportException(iox);
+        throw new TTransportException(TTransportException.NOT_OPEN, iox);
       }
     }
   }
@@ -139,14 +139,14 @@
    */
   public void open() throws TTransportException {
     if (isOpen()) {
-      throw new TTransportException("Socket already connected.");
+      throw new TTransportException(TTransportException.ALREADY_OPEN, "Socket already connected.");
     }
 
     if (host_.length() == 0) {
-      throw new TTransportException("Cannot open null host.");
+      throw new TTransportException(TTransportException.NOT_OPEN, "Cannot open null host.");
     }
     if (port_ <= 0) {
-      throw new TTransportException("Cannot open without port.");
+      throw new TTransportException(TTransportException.NOT_OPEN, "Cannot open without port.");
     }
 
     if (socket_ == null) {
@@ -159,7 +159,7 @@
       outputStream_ = new BufferedOutputStream(socket_.getOutputStream(), 1024);
     } catch (IOException iox) {
       close();
-      throw new TTransportException(iox);
+      throw new TTransportException(TTransportException.NOT_OPEN, iox);
     }
   }
 
diff --git a/lib/java/src/transport/TTransportException.java b/lib/java/src/transport/TTransportException.java
index a67b6ed..5d9e371 100644
--- a/lib/java/src/transport/TTransportException.java
+++ b/lib/java/src/transport/TTransportException.java
@@ -8,14 +8,38 @@
  * @author Mark Slee <mcslee@facebook.com>
  */
 public class TTransportException extends TException {
+
+  public static final int UNKNOWN = 0;
+  public static final int NOT_OPEN = 1;
+  public static final int ALREADY_OPEN = 2;
+  public static final int TIMED_OUT = 3;
+  public static final int END_OF_FILE = 4;
+
+  protected int type_ = UNKNOWN;
+
   public TTransportException() {
     super();
   }
 
+  public TTransportException(int type) {
+    super();
+    type_ = type;
+  }
+
+  public TTransportException(int type, String message) {
+    super(message);
+    type_ = type;
+  }
+
   public TTransportException(String message) {
     super(message);
   }
 
+  public TTransportException(int type, Throwable cause) {
+    super(cause);
+    type_ = type;
+  }
+
   public TTransportException(Throwable cause) {
     super(cause);
   }
@@ -23,4 +47,14 @@
   public TTransportException(String message, Throwable cause) {
     super(message, cause);
   }
+
+  public TTransportException(int type, String message, Throwable cause) {
+    super(message, cause);
+    type_ = type;
+  }
+
+  public int getType() {
+    return type_;
+  }
+
 }
