THRIFT-620. java: Compact Protocol should call readAll, not read
This patch switches to calling readAll instead of read.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@832633 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java b/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java
index e2d0bfd..79f2f4a 100755
--- a/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java
+++ b/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java
@@ -554,7 +554,7 @@
    * Read a single byte off the wire. Nothing interesting here.
    */
   public byte readByte() throws TException {
-    trans_.read(byteRawBuf, 0, 1);
+    trans_.readAll(byteRawBuf, 0, 1);
     return byteRawBuf[0];
   }
 
@@ -584,7 +584,7 @@
    */
   public double readDouble() throws TException {
     byte[] longBits = new byte[8];
-    trans_.read(longBits, 0, 8);
+    trans_.readAll(longBits, 0, 8);
     return Double.longBitsToDouble(bytesToLong(longBits));
   }
 
@@ -607,7 +607,7 @@
     if (length == 0) return new byte[0];
 
     byte[] buf = new byte[length];
-    trans_.read(buf, 0, length);
+    trans_.readAll(buf, 0, length);
     return buf;
   }