Class PofSparseArray.NilPofValue

All Implemented Interfaces:
PofValue
Enclosing class:
PofSparseArray

protected static class PofSparseArray.NilPofValue extends SimplePofValue
NilPofValue represents a value that does not exist in the original POF stream.
  • Constructor Details

    • NilPofValue

      public NilPofValue(PofValue valueParent, PofContext ctx, int of, int nType, int nIndex)
      Construct a NilPofValue instance.
      Parameters:
      valueParent - parent value within the POF stream
      ctx - POF context to use when reading or writing properties
      of - offset of this value from the beginning of POF stream
      nType - POF type identifier for this value
      nIndex - index of this value within the parent sparse array
  • Method Details

    • getValue

      public Object getValue(int nType)
      Return the deserialized value which this PofValue represents.

      Note: For primitive types such as int or boolean, the POF type is not stored in the POF stream. Therefore, for primitive types, the type must be explicitly specified with the nType parameter.

      Specified by:
      getValue in interface PofValue
      Overrides:
      getValue in class AbstractPofValue
      Parameters:
      nType - the required POF type of the returned value or PofConstants.T_UNKNOWN if the type is to be inferred from the serialized state
      Returns:
      the deserialized value
    • setValue

      public void setValue(Object oValue)
      Update this PofValue.

      The changes made using this method will be immediately reflected in the result of PofValue.getValue() method, but will not be applied to the underlying POF stream until the PofValue.applyChanges() method is invoked on the root PofValue.

      Specified by:
      setValue in interface PofValue
      Overrides:
      setValue in class AbstractPofValue
      Parameters:
      oValue - new deserialized value for this PofValue
    • getSerializedValue

      public ReadBuffer getSerializedValue()
      Return this value's serialized form.
      Overrides:
      getSerializedValue in class AbstractPofValue
      Returns:
      this value's serialized form