code: public int setSizeLimit(final int limit)
      {
          if (limit < 0)
          {
              throw new IllegalArgumentException(
                      "Size limit cannot be negative: " + limit);
          }
          final int oldLimit = sizeLimit;
          sizeLimit = limit;
          return oldLimit;
      }
docs: Set the maximum message size. In order to prevent malicious messages from exhausting memory or causing integer
  overflows, {@code CodedInput} limits how large a message may be. The default limit is 64MB. You should set this
  limit as small as you can without harming your app's functionality. Note that size limits only apply when reading
  from an {@code InputStream}, not when constructed around a raw byte array.
  <p>
  If you want to read several messages from a single CodedInput, you could call {@link #resetSizeCounter()} after
  each one to avoid hitting the size limit.
  
  @return the old limit.