Input

fm.serializer.Input

Generic Input trait to be implemented by Serialization Implementations

See the docs for Output for the distinction between RAW, NESTED, and FIELD Input/Output. The only difference for Input is that there aren't readNestedXXX() methods. Instead the way fields for objects are read is:

  • readFieldNumber(...) to get the name/number of the field
  • readNestedXXX() to get the value of the field (based on looking up the proper type given the name/number)

Attributes

Graph
Supertypes
trait RawInput
trait FieldInput
trait NestedInput
class Object
trait Matchable
class Any
Show all
Known subtypes

Members list

Value members

Inherited methods

def allowStringMap: Boolean

Attributes

Inherited from:
RawInput
def hasAnotherElement: Boolean

Is there another element to read in the collection?

Is there another element to read in the collection?

Attributes

Inherited from:
CollectionInput
def lastFieldName(): String

The last field name that was read (if any)

The last field name that was read (if any)

Attributes

Inherited from:
FieldInput
def lastFieldNumber(): Int

The last field number that was read (if any)

The last field number that was read (if any)

Attributes

Inherited from:
FieldInput
def nextValueIsNull: Boolean

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.

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

Attributes

Inherited from:
RawInput
def readFieldName(): String

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

Attributes

Inherited from:
FieldInput
def readFieldNumber(nameToNumMap: FieldNameToNumberLookup): Int

This is for reading fields of an object.

This is for reading fields of an object.

Return the field number for the next readable field. Returns 0 if we've reached the end of the object/message

Attributes

Inherited from:
FieldInput
def readNestedBigDecimal(): BigDecimal

Attributes

Inherited from:
NestedInput
def readNestedBigInteger(): BigInteger

Attributes

Inherited from:
NestedInput
def readNestedBool(): Boolean

Attributes

Inherited from:
NestedInput
def readNestedByteArray(): Array[Byte]

Attributes

Inherited from:
NestedInput

Attributes

Inherited from:
NestedInput
def readNestedDouble(): Double

Attributes

Inherited from:
NestedInput
def readNestedFixedInt(): Int

Attributes

Inherited from:
NestedInput
def readNestedFixedLong(): Long

Attributes

Inherited from:
NestedInput
def readNestedFloat(): Float

Attributes

Inherited from:
NestedInput
def readNestedInt(): Int

Attributes

Inherited from:
NestedInput
def readNestedLong(): Long

Attributes

Inherited from:
NestedInput
def readNestedObject[T](f: FieldInput => T): T

Attributes

Inherited from:
NestedInput
def readNestedSignedInt(): Int

Attributes

Inherited from:
NestedInput
def readNestedSignedLong(): Long

Attributes

Inherited from:
NestedInput
def readNestedString(): String

Attributes

Inherited from:
NestedInput

Attributes

Inherited from:
NestedInput

Attributes

Inherited from:
NestedInput
def readRawBigDecimal(): BigDecimal

Attributes

Inherited from:
RawInput
def readRawBigInteger(): BigInteger

Attributes

Inherited from:
RawInput
def readRawBool(): Boolean

Attributes

Inherited from:
RawInput
def readRawByteArray(): Array[Byte]

Attributes

Inherited from:
RawInput
def readRawCollection[T](f: CollectionInput => T): T

Attributes

Inherited from:
RawInput
def readRawDouble(): Double

Attributes

Inherited from:
RawInput
def readRawFixedInt(): Int

Attributes

Inherited from:
RawInput
def readRawFixedLong(): Long

Attributes

Inherited from:
RawInput
def readRawFloat(): Float

Attributes

Inherited from:
RawInput
def readRawInt(): Int

Attributes

Inherited from:
RawInput
def readRawLong(): Long

Attributes

Inherited from:
RawInput
def readRawObject[T](f: FieldInput => T): T

Attributes

Inherited from:
RawInput
def readRawSignedInt(): Int

Attributes

Inherited from:
RawInput
def readRawSignedLong(): Long

Attributes

Inherited from:
RawInput
def readRawString(): String

Attributes

Inherited from:
RawInput
def readRawUnsignedInt(): Int

Attributes

Inherited from:
RawInput
def readRawUnsignedLong(): Long

Attributes

Inherited from:
RawInput
def reportUnsetField[T](number: Int, name: String, hasUserDefinedDefaultValue: Boolean, deserializer: Deserializer[T]): Unit

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.

Value parameters

deserializer

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

hasUserDefinedDefaultValue

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

name

The field name. Note: This can be null.

number

The field number

Attributes

Inherited from:
FieldInput
def skipUnknownField(): Unit

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.

Attributes

Inherited from:
FieldInput