111112113114115116117118
try { for (int bufflen = 0; (bufflen = data.read(buffer)) >= 0;) { trans_.write(buffer, 0, bufflen); } } catch (IOException e) { throw new TException("Failed to read from stream", e); } }
424425426427428429430431432433434435436437
checkReadLength_ = true; } protected void checkReadLength(int length) throws TException { if (length < 0) { throw new TException("Negative length: " + length); } if (checkReadLength_) { readLength_ -= length; if (readLength_ < 0) { throw new TException("Message length exceeded: " + length); } } }
6970717273747576777879
* recursive depth, to prevent Java stack overflow. */ public static void skip(TProtocol prot, byte type, int maxDepth) throws TException { if (maxDepth <= 0) { throw new TException("Maximum skip depth exceeded"); } switch (type) { case TType.BOOL: { prot.readBool();