diff options
author | Bryan Duxbury <bryanduxbury@apache.org> | 2009-11-04 00:30:10 +0000 |
---|---|---|
committer | Bryan Duxbury <bryanduxbury@apache.org> | 2009-11-04 00:30:10 +0000 |
commit | 6731b57b582badaa3fca91e6ac54bf18cd2cf0f7 (patch) | |
tree | 23d56486b6514d39e6ed916f0cb460d1ec6dc9b1 | |
parent | 3533dcbef88d1c4bae8e610f289c3297aea26a67 (diff) | |
download | thrift-6731b57b582badaa3fca91e6ac54bf18cd2cf0f7.tar.gz |
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
-rwxr-xr-x | lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java b/lib/java/src/org/apache/thrift/protocol/TCompactProtocol.java index e2d0bfdc1..79f2f4aab 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 @@ public final class TCompactProtocol extends TProtocol { * 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 final class TCompactProtocol extends TProtocol { */ 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 @@ public final class TCompactProtocol extends TProtocol { if (length == 0) return new byte[0]; byte[] buf = new byte[length]; - trans_.read(buf, 0, length); + trans_.readAll(buf, 0, length); return buf; } |