Class CodedInputStream.ArrayDecoderNewVarintAllCases

    • Constructor Detail

      • ArrayDecoderNewVarintAllCases

        private ArrayDecoderNewVarintAllCases​(byte[] buffer,
                                              int offset,
                                              int len,
                                              boolean immutable)
    • Method Detail

      • readRawVarint32Expected5BytesMax

        protected int readRawVarint32Expected5BytesMax()
                                                throws java.io.IOException
        Description copied from class: CodedInputStream.ArrayDecoder
        Temporary shim to enable new varint experiment.

        Same as readRawVarint32 but for callers where the varint being longer than 5 bytes should never happen in practice (eg tags and lengths).

        Specified by:
        readRawVarint32Expected5BytesMax in class CodedInputStream.ArrayDecoder
        Throws:
        java.io.IOException
      • readRawVarint32Expected10BytesMax

        protected int readRawVarint32Expected10BytesMax()
                                                 throws java.io.IOException
        Description copied from class: CodedInputStream.ArrayDecoder
        Temporary shim to enable new varint experiment.

        Same as readRawVarint32 but for callers where a 10-byte varint is 'normal' (eg int32 fields where negative values will be 10 bytes).

        Specified by:
        readRawVarint32Expected10BytesMax in class CodedInputStream.ArrayDecoder
        Throws:
        java.io.IOException