protected void checkContainerSize ( int size ) throws TProtocolException { if ( size < 0 ) { throw new TProtocolException ( "Negative container size: " + size ) ; } if ( checkReadLength_ && ( readLength_ - size ) < 0 ) { throw new TProtocolException ( "Remaining message length is " + readLength_ + " but container size in underlying TTransport is set to at least: " + size ) ; } }
Check if the container size is valid .