Class

fm.serializer.protobuf

ProtobufByteBufferInput

Related Doc: package protobuf

Permalink

final class ProtobufByteBufferInput extends ProtobufInput

Optimized Input implementation for reading from a byte array that is much more JVM/JIT optimization friendly than reading from an InputStream.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ProtobufByteBufferInput
  2. ProtobufInput
  3. Input
  4. RawInput
  5. CollectionInput
  6. FieldInput
  7. NestedInput
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ProtobufByteBufferInput(buffer: ByteBuffer, options: ProtobufOptions)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def allowStringMap: Boolean

    Permalink
    Definition Classes
    ProtobufInputRawInputFieldInputNestedInput
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. final def checkLastTagTypeWas(expectedWireType: Int): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    ProtobufInput
  7. final def checkLastTagWas(value: Int): Unit

    Permalink

    Verifies that the last call to readTag() returned the given tag value.

    Verifies that the last call to readTag() returned the given tag value. This is used to verify that a nested group ended with the correct end tag.

    Attributes
    protected
    Definition Classes
    ProtobufInput
    Exceptions thrown

    InvalidProtocolBufferException value does not match the last tag.

  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  9. final def decodeZigZag32(n: Int): Int

    Permalink

    Decode a ZigZag-encoded 32-bit value.

    Decode a ZigZag-encoded 32-bit value. ZigZag encodes signed integers into values that can be efficiently encoded with varint. (Otherwise, negative values must be sign-extended to 64 bits to be varint encoded, thus always taking 10 bytes on the wire.)

    n

    An unsigned 32-bit integer, stored in a signed int because Java has no explicit unsigned support.

    returns

    A signed 32-bit integer.

    Attributes
    protected
    Definition Classes
    ProtobufInput
  10. def decodeZigZag64(n: Long): Long

    Permalink

    Decode a ZigZag-encoded 64-bit value.

    Decode a ZigZag-encoded 64-bit value. ZigZag encodes signed integers into values that can be efficiently encoded with varint. (Otherwise, negative values must be sign-extended to 64 bits to be varint encoded, thus always taking 10 bytes on the wire.)

    n

    An unsigned 64-bit integer, stored in a signed int because Java has no explicit unsigned support.

    returns

    A signed 64-bit integer.

    Attributes
    protected
    Definition Classes
    ProtobufInput
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  14. final def hasAnotherElement: Boolean

    Permalink

    Is there another element to read in the collection?

    Is there another element to read in the collection?

    Definition Classes
    ProtobufByteBufferInputCollectionInput
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. final def lastFieldName(): String

    Permalink

    The last field name that was read (if any)

    The last field name that was read (if any)

    Definition Classes
    ProtobufInputFieldInput
  18. final def lastFieldNumber(): Int

    Permalink

    The last field number that was read (if any)

    The last field number that was read (if any)

    Definition Classes
    ProtobufInputFieldInput
  19. final var lastTag: Int

    Permalink

    The last tag that was read by readTag()

    The last tag that was read by readTag()

    Attributes
    protected
    Definition Classes
    ProtobufInput
  20. final def lastTagIsNullValue: Boolean

    Permalink

    Was the last tag read for a null field? This is only applicable for reading fields but is safe to use in the readNestedXXX call because it will only ever be true if we are actually reading a null value field.

    Was the last tag read for a null field? This is only applicable for reading fields but is safe to use in the readNestedXXX call because it will only ever be true if we are actually reading a null value field.

    Attributes
    protected
    Definition Classes
    ProtobufInput
  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. def nextValueIsNull: Boolean

    Permalink

    Returns true if the next value is known to be null otherwise false if the value is not null or is unknown.

    Returns true if the next value is known to be null otherwise false if the value is not null or is unknown. This means that even if the next value ends up being null this can return false.

    Note: If the next value is null then this method should consume that input

    Definition Classes
    ProtobufInputRawInputNestedInput
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  25. def readFieldName(): String

    Permalink

    If dynamic string maps are supported then this should be implemented otherwise this can just throw an exception.

    If dynamic string maps are supported then this should be implemented otherwise this can just throw an exception.

    null should be returns on the end of an object/message

    Definition Classes
    ProtobufInputFieldInput
  26. final def readFieldNumber(nameToNumMap: FieldNameToNumberLookup): Int

    Permalink

    Read the next field number

    Read the next field number

    Definition Classes
    ProtobufInputFieldInput
  27. def readLengthDelimited[T](f: (Input) ⇒ T): T

    Permalink
    Definition Classes
    ProtobufByteBufferInputProtobufInput
  28. final def readNestedBigDecimal(): BigDecimal

    Permalink
    Definition Classes
    ProtobufInputNestedInput
  29. final def readNestedBigInteger(): BigInteger

    Permalink
    Definition Classes
    ProtobufInputNestedInput
  30. final def readNestedBool(): Boolean

    Permalink
    Definition Classes
    ProtobufInputNestedInput
  31. final def readNestedByteArray(): Array[Byte]

    Permalink
    Definition Classes
    ProtobufInputNestedInput
  32. def readNestedCollection[T](f: (CollectionInput) ⇒ T): T

    Permalink
    Definition Classes
    ProtobufInputNestedInput
  33. final def readNestedDouble(): Double

    Permalink
    Definition Classes
    ProtobufInputNestedInput
  34. final def readNestedFixedInt(): Int

    Permalink
    Definition Classes
    ProtobufInputNestedInput
  35. final def readNestedFixedLong(): Long

    Permalink
    Definition Classes
    ProtobufInputNestedInput
  36. final def readNestedFloat(): Float

    Permalink
    Definition Classes
    ProtobufInputNestedInput
  37. final def readNestedInt(): Int

    Permalink
    Definition Classes
    ProtobufInputNestedInput
  38. final def readNestedLong(): Long

    Permalink
    Definition Classes
    ProtobufInputNestedInput
  39. def readNestedObject[T](f: (FieldInput) ⇒ T): T

    Permalink
    Definition Classes
    ProtobufInputNestedInput
  40. final def readNestedSignedInt(): Int

    Permalink
    Definition Classes
    ProtobufInputNestedInput
  41. final def readNestedSignedLong(): Long

    Permalink
    Definition Classes
    ProtobufInputNestedInput
  42. final def readNestedString(): String

    Permalink
  43. final def readNestedUnsignedInt(): Int

    Permalink
    Definition Classes
    ProtobufInputNestedInput
  44. final def readNestedUnsignedLong(): Long

    Permalink
    Definition Classes
    ProtobufInputNestedInput
  45. final def readRawBigDecimal(): BigDecimal

    Permalink
    Definition Classes
    ProtobufInputRawInput
  46. final def readRawBigInteger(): BigInteger

    Permalink
    Definition Classes
    ProtobufInputRawInput
  47. final def readRawBool(): Boolean

    Permalink
    Definition Classes
    ProtobufInputRawInput
  48. def readRawByte(): Byte

    Permalink

    Read a raw byte with checking for the end of the stream

    Read a raw byte with checking for the end of the stream

    Attributes
    protected
    Definition Classes
    ProtobufByteBufferInputProtobufInput
  49. final def readRawByteArray(): Array[Byte]

    Permalink
  50. final def readRawBytes(size: Int): Array[Byte]

    Permalink
    Attributes
    protected
    Definition Classes
    ProtobufByteBufferInputProtobufInput
  51. def readRawCollection[T](f: (CollectionInput) ⇒ T): T

    Permalink
    Definition Classes
    ProtobufInputRawInput
  52. final def readRawDouble(): Double

    Permalink
    Definition Classes
    ProtobufInputRawInput
  53. final def readRawFixedInt(): Int

    Permalink
    Definition Classes
    ProtobufInputRawInput
  54. final def readRawFixedLong(): Long

    Permalink
    Definition Classes
    ProtobufInputRawInput
  55. final def readRawFloat(): Float

    Permalink
    Definition Classes
    ProtobufInputRawInput
  56. final def readRawInt(): Int

    Permalink
    Definition Classes
    ProtobufInputRawInput
  57. final def readRawLittleEndian32(): Int

    Permalink

    Read a 32-bit little-endian integer from the stream.

    Read a 32-bit little-endian integer from the stream.

    Attributes
    protected
    Definition Classes
    ProtobufInput
  58. final def readRawLittleEndian64(): Long

    Permalink

    Read a 64-bit little-endian integer from the stream.

    Read a 64-bit little-endian integer from the stream.

    Attributes
    protected
    Definition Classes
    ProtobufInput
  59. final def readRawLong(): Long

    Permalink
    Definition Classes
    ProtobufInputRawInput
  60. def readRawObject[T](f: (FieldInput) ⇒ T): T

    Permalink
    Definition Classes
    ProtobufInputRawInput
  61. final def readRawSignedInt(): Int

    Permalink
    Definition Classes
    ProtobufInputRawInput
  62. final def readRawSignedLong(): Long

    Permalink
    Definition Classes
    ProtobufInputRawInput
  63. final def readRawString(): String

    Permalink
  64. final def readRawUnsignedInt(): Int

    Permalink
    Definition Classes
    ProtobufInputRawInput
  65. final def readRawUnsignedLong(): Long

    Permalink
    Definition Classes
    ProtobufInputRawInput
  66. final def readRawVarint32(firstByte: Byte): Int

    Permalink

    Read a raw Varint from the stream given the first byte.

    Read a raw Varint from the stream given the first byte. If larger than 32 bits, discard the upper bits.

    Attributes
    protected
    Definition Classes
    ProtobufInput
  67. final def readRawVarint32(): Int

    Permalink

    Read a raw Varint from the stream.

    Read a raw Varint from the stream. If larger than 32 bits, discard the upper bits.

    Definition Classes
    ProtobufInput
  68. def readTag(): Int

    Permalink

    Attempt to read a field tag, returning zero if we have reached EOF.

    Attempt to read a field tag, returning zero if we have reached EOF. Protocol message parsers use this to read tags, since a protocol message may legally end wherever a tag occurs, and zero is not a valid tag number.

    Attributes
    protected
    Definition Classes
    ProtobufByteBufferInputProtobufInput
  69. def reportUnsetField[T](number: Int, name: String, hasUserDefinedDefaultValue: Boolean, deserializer: Deserializer[T]): Unit

    Permalink

    This is for reporting that fields for an object were not read and whether or not they had a user-defined default value.

    This is for reporting that fields for an object were not read and whether or not they had a user-defined default value.

    number

    The field number

    name

    The field name. Note: This can be null.

    hasUserDefinedDefaultValue

    Whether or not there was a user defined default value (e.g. val foo: Int = 123)

    deserializer

    The deserializer for the field. Note: This can be null.

    Definition Classes
    FieldInput
  70. final def skipField(tag: Int): Boolean

    Permalink

    Reads and discards a single field, given its tag value.

    Reads and discards a single field, given its tag value.

    returns

    false if the tag is an endgroup tag, in which case nothing is skipped. Otherwise, returns true.

    Definition Classes
    ProtobufInput
  71. final def skipMessage(): Unit

    Permalink

    Reads and discards an entire message.

    Reads and discards an entire message. This will read either until EOF or until an endgroup tag, whichever comes first.

    Definition Classes
    ProtobufInput
  72. final def skipRawBytes(size: Int): Unit

    Permalink

    Reads and discards size bytes.

    Reads and discards size bytes.

    Definition Classes
    ProtobufByteBufferInputProtobufInput
    Exceptions thrown

    InvalidProtocolBufferException The end of the stream or the current limit was reached.

  73. final def skipUnknownField(): Unit

    Permalink

    Skip an unknown field value.

    Skip an unknown field value.

    If after calling readFieldNumber(...) we don't know how to handle the resulting field number then this method can be called to skip the value of the field after which we can call readFieldNumber(...) again.

    Definition Classes
    ProtobufInputFieldInput
  74. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  75. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  76. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  77. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  78. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from ProtobufInput

Inherited from Input

Inherited from RawInput

Inherited from CollectionInput

Inherited from FieldInput

Inherited from NestedInput

Inherited from AnyRef

Inherited from Any

Ungrouped