Class CodedInputStream


  • public final class CodedInputStream
    extends java.lang.Object
    Minimal copy of protobuf-java's CodedInputStream, currently only used in GrpcStatusUtil.

    This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

    • Field Detail

      • buffer

        private final byte[] buffer
      • limit

        private final int limit
      • pos

        private int pos
      • lastTag

        private int lastTag
    • Constructor Detail

      • CodedInputStream

        private CodedInputStream​(byte[] buffer)
    • Method Detail

      • readTag

        public int readTag()
                    throws java.io.IOException
        Reads the next tag.
        Throws:
        java.io.IOException
      • readStringRequireUtf8

        public java.lang.String readStringRequireUtf8()
                                               throws java.io.IOException
        Reads a string field.
        Throws:
        java.io.IOException
      • skipField

        public boolean skipField​(int tag)
                          throws java.io.IOException
        Skips a field.
        Throws:
        java.io.IOException
      • isAtEnd

        private boolean isAtEnd()
      • readRawVarint32

        public int readRawVarint32()
                            throws java.io.IOException
        Read varint32.
        Throws:
        java.io.IOException
      • readRawVarint64SlowPath

        private long readRawVarint64SlowPath()
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • readRawByte

        private byte readRawByte()
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • skipRawVarint

        private void skipRawVarint()
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • readDouble

        public double readDouble()
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • readRawLittleEndian64

        private long readRawLittleEndian64()
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • skipRawVarintFastPath

        private void skipRawVarintFastPath()
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • skipRawVarintSlowPath

        private void skipRawVarintSlowPath()
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • skipRawBytes

        private void skipRawBytes​(int length)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • newNegativeException

        private static java.io.IOException newNegativeException()
      • newTruncatedException

        private static java.io.IOException newTruncatedException()
      • newMalformedVarintException

        private static java.io.IOException newMalformedVarintException()