Package io.protostuff

Interface Input

    • Method Detail

      • handleUnknownField

        <T> void handleUnknownField​(int fieldNumber,
                                    Schema<T> schema)
                             throws java.io.IOException
        The underlying implementation should handle the unknown field.
        Throws:
        java.io.IOException
      • readFieldNumber

        <T> int readFieldNumber​(Schema<T> schema)
                         throws java.io.IOException
        Reads the field number of a message/object tied to the given schema.
        Throws:
        java.io.IOException
      • readInt32

        int readInt32()
               throws java.io.IOException
        Reads a variable int field value.
        Throws:
        java.io.IOException
      • readUInt32

        int readUInt32()
                throws java.io.IOException
        Reads an unsigned int field value.
        Throws:
        java.io.IOException
      • readSInt32

        int readSInt32()
                throws java.io.IOException
        Reads a signed int field value.
        Throws:
        java.io.IOException
      • readFixed32

        int readFixed32()
                 throws java.io.IOException
        Reads a fixed int(4 bytes) field value.
        Throws:
        java.io.IOException
      • readSFixed32

        int readSFixed32()
                  throws java.io.IOException
        Reads a signed+fixed int(4 bytes) field value.
        Throws:
        java.io.IOException
      • readInt64

        long readInt64()
                throws java.io.IOException
        Reads a variable long field value.
        Throws:
        java.io.IOException
      • readUInt64

        long readUInt64()
                 throws java.io.IOException
        Reads an unsigned long field value.
        Throws:
        java.io.IOException
      • readSInt64

        long readSInt64()
                 throws java.io.IOException
        Reads a signed long field value.
        Throws:
        java.io.IOException
      • readFixed64

        long readFixed64()
                  throws java.io.IOException
        Reads a fixed long(8 bytes) field value.
        Throws:
        java.io.IOException
      • readSFixed64

        long readSFixed64()
                   throws java.io.IOException
        Reads a signed+fixed long(8 bytes) field value.
        Throws:
        java.io.IOException
      • readFloat

        float readFloat()
                 throws java.io.IOException
        Reads a float field value.
        Throws:
        java.io.IOException
      • readDouble

        double readDouble()
                   throws java.io.IOException
        Reads a double field value.
        Throws:
        java.io.IOException
      • readBool

        boolean readBool()
                  throws java.io.IOException
        Reads a boolean field value.
        Throws:
        java.io.IOException
      • readEnum

        int readEnum()
              throws java.io.IOException
        Reads an enum(its number) field value.
        Throws:
        java.io.IOException
      • readString

        java.lang.String readString()
                             throws java.io.IOException
        Reads a String field value.
        Throws:
        java.io.IOException
      • readBytes

        ByteString readBytes()
                      throws java.io.IOException
        Reads a ByteString field value.
        Throws:
        java.io.IOException
      • readBytes

        void readBytes​(java.nio.ByteBuffer bb)
                throws java.io.IOException
        Reads a field value into a ByteBuffer.
        Throws:
        java.io.IOException
      • readByteArray

        byte[] readByteArray()
                      throws java.io.IOException
        Reads a byte array field value.
        Throws:
        java.io.IOException
      • readByteBuffer

        java.nio.ByteBuffer readByteBuffer()
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • mergeObject

        <T> T mergeObject​(T value,
                          Schema<T> schema)
                   throws java.io.IOException
        Merges an object(with schema) field value. The provided schema handles the deserialization for the object.
        Throws:
        java.io.IOException
      • transferByteRangeTo

        void transferByteRangeTo​(Output output,
                                 boolean utf8String,
                                 int fieldNumber,
                                 boolean repeated)
                          throws java.io.IOException
        Transfer the byte range to the output. Capable of zero-copy transfer depending on the type of input.
        Throws:
        java.io.IOException