Interface PortableWriter


@Deprecated(since="5.4", forRemoval=true) public interface PortableWriter
Deprecated, for removal: This API element is subject to removal in a future version.
Portable Serialization has been deprecated. We recommend you use Compact Serialization as Portable Serialization will be removed as of version 7.0.
Provides means for writing portable fields to binary data in the form of java primitives, arrays of java primitives, nested portable fields and arrays of portable fields.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    After writing portable fields one can subsequently write remaining fields in the old-fashioned way.
    void
    writeBoolean(String fieldName, boolean value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a primitive boolean.
    void
    writeBooleanArray(String fieldName, boolean[] booleans)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a primitive boolean-array.
    void
    writeByte(String fieldName, byte value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a primitive byte.
    void
    writeByteArray(String fieldName, byte[] bytes)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a primitive byte-array.
    void
    writeChar(String fieldName, int value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a primitive char.
    void
    writeCharArray(String fieldName, char[] chars)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a primitive char-array.
    void
    writeDate(String fieldName, LocalDate value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a date field consisting of year, month of the year and day of the month
    void
    writeDateArray(String fieldName, LocalDate[] values)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes an array of Date's
    void
    writeDecimal(String fieldName, BigDecimal value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a decimal which is arbitrary precision and scale floating-point number
    void
    writeDecimalArray(String fieldName, BigDecimal[] values)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes an array of Decimals
    void
    writeDouble(String fieldName, double value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a primitive double.
    void
    writeDoubleArray(String fieldName, double[] values)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a primitive double array.
    void
    writeFloat(String fieldName, float value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a primitive float.
    void
    writeFloatArray(String fieldName, float[] values)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a primitive float array.
    void
    writeInt(String fieldName, int value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a primitive int.
    void
    writeIntArray(String fieldName, int[] ints)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a primitive int-array.
    void
    writeLong(String fieldName, long value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a primitive long.
    void
    writeLongArray(String fieldName, long[] longs)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a primitive long-array.
    void
    writeNullPortable(String fieldName, int factoryId, int classId)
    Deprecated, for removal: This API element is subject to removal in a future version.
    To write a null portable value, user needs to provide class and factoryIds of related class.
    void
    writePortable(String fieldName, Portable portable)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a Portable.
    void
    writePortableArray(String fieldName, Portable[] values)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a an array of Portables.
    void
    writeShort(String fieldName, short value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a primitive short.
    void
    writeShortArray(String fieldName, short[] values)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a primitive short-array.
    void
    writeString(String fieldName, String value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a UTF string.
    void
    writeStringArray(String fieldName, String[] values)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a String-array.
    void
    writeTime(String fieldName, LocalTime value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Write a time field consisting of hour, minute, seconds and nanos parts
    void
    writeTimeArray(String fieldName, LocalTime[] values)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes an array of Time's
    void
    writeTimestamp(String fieldName, LocalDateTime value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a timestamp field consisting of year, month of the year, day of the month, hour, minute, seconds, nanos parts
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes an array of Timestamp's
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes a timestamp with timezone field consisting of year, month of the year, day of the month, offset seconds, hour, minute, seconds, nanos parts
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Writes an array of TimestampWithTimezone's
    void
    writeUTF(String fieldName, String value)
    Deprecated.
    for the sake of better naming.
    void
    writeUTFArray(String fieldName, String[] values)
    Deprecated.
    for the sake of better naming.
  • Method Details

    • writeInt

      void writeInt(@Nonnull String fieldName, int value) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a primitive int.
      Parameters:
      fieldName - name of the field
      value - int value to be written
      Throws:
      IOException - in case of any exceptional case
    • writeLong

      void writeLong(@Nonnull String fieldName, long value) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a primitive long.
      Parameters:
      fieldName - name of the field
      value - long value to be written
      Throws:
      IOException - in case of any exceptional case
    • writeUTF

      @Deprecated void writeUTF(@Nonnull String fieldName, @Nullable String value) throws IOException
      Deprecated.
      for the sake of better naming. Use writeString(String, String) instead.
      Writes a UTF string.
      Parameters:
      fieldName - name of the field
      value - utf string value to be written
      Throws:
      IOException - in case of any exceptional case
    • writeString

      void writeString(@Nonnull String fieldName, @Nullable String value) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a UTF string.
      Parameters:
      fieldName - name of the field
      value - utf string value to be written
      Throws:
      IOException - in case of any exceptional case
    • writeBoolean

      void writeBoolean(@Nonnull String fieldName, boolean value) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a primitive boolean.
      Parameters:
      fieldName - name of the field
      value - int value to be written
      Throws:
      IOException - in case of any exceptional case
    • writeByte

      void writeByte(@Nonnull String fieldName, byte value) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a primitive byte.
      Parameters:
      fieldName - name of the field
      value - int value to be written
      Throws:
      IOException - in case of any exceptional case
    • writeChar

      void writeChar(@Nonnull String fieldName, int value) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a primitive char.
      Parameters:
      fieldName - name of the field
      value - int value to be written
      Throws:
      IOException - in case of any exceptional case
    • writeDouble

      void writeDouble(@Nonnull String fieldName, double value) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a primitive double.
      Parameters:
      fieldName - name of the field
      value - int value to be written
      Throws:
      IOException - in case of any exceptional case
    • writeFloat

      void writeFloat(@Nonnull String fieldName, float value) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a primitive float.
      Parameters:
      fieldName - name of the field
      value - int value to be written
      Throws:
      IOException - in case of any exceptional case
    • writeShort

      void writeShort(@Nonnull String fieldName, short value) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a primitive short.
      Parameters:
      fieldName - name of the field
      value - int value to be written
      Throws:
      IOException - in case of any exceptional case
    • writePortable

      void writePortable(@Nonnull String fieldName, @Nullable Portable portable) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a Portable. Use writeNullPortable(String, int, int) to write a null Portable
      Parameters:
      fieldName - name of the field
      portable - Portable to be written
      Throws:
      IOException - in case of any exceptional case
    • writeNullPortable

      void writeNullPortable(@Nonnull String fieldName, int factoryId, int classId) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      To write a null portable value, user needs to provide class and factoryIds of related class.
      Parameters:
      fieldName - name of the field
      factoryId - factory ID of related portable class
      classId - class ID of related portable class
      Throws:
      IOException - in case of any exceptional case
    • writeDecimal

      void writeDecimal(@Nonnull String fieldName, @Nullable BigDecimal value) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a decimal which is arbitrary precision and scale floating-point number
      Parameters:
      fieldName - name of the field
      value - BigDecimal value to be written
      Throws:
      IOException - in case of any exceptional case
    • writeTime

      void writeTime(@Nonnull String fieldName, @Nullable LocalTime value) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Write a time field consisting of hour, minute, seconds and nanos parts
      Parameters:
      fieldName - name of the field
      value - LocalTime value to be written
      Throws:
      IOException - in case of any exceptional case
    • writeDate

      void writeDate(@Nonnull String fieldName, @Nullable LocalDate value) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a date field consisting of year, month of the year and day of the month
      Parameters:
      fieldName - name of the field
      value - LocalDate value to be written
      Throws:
      IOException - in case of any exceptional case
    • writeTimestamp

      void writeTimestamp(@Nonnull String fieldName, @Nullable LocalDateTime value) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a timestamp field consisting of year, month of the year, day of the month, hour, minute, seconds, nanos parts
      Parameters:
      fieldName - name of the field
      value - LocalDateTime value to be written
      Throws:
      IOException - in case of any exceptional case
    • writeTimestampWithTimezone

      void writeTimestampWithTimezone(@Nonnull String fieldName, @Nullable OffsetDateTime value) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a timestamp with timezone field consisting of year, month of the year, day of the month, offset seconds, hour, minute, seconds, nanos parts
      Parameters:
      fieldName - name of the field
      value - OffsetDateTime value to be written
      Throws:
      IOException - in case of any exceptional case
    • writeByteArray

      void writeByteArray(@Nonnull String fieldName, @Nullable byte[] bytes) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a primitive byte-array.
      Parameters:
      fieldName - name of the field
      bytes - byte array to be written
      Throws:
      IOException - in case of any exceptional case
    • writeBooleanArray

      void writeBooleanArray(@Nonnull String fieldName, @Nullable boolean[] booleans) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a primitive boolean-array.
      Parameters:
      fieldName - name of the field
      booleans - boolean array to be written
      Throws:
      IOException - in case of any exceptional case
    • writeCharArray

      void writeCharArray(@Nonnull String fieldName, @Nullable char[] chars) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a primitive char-array.
      Parameters:
      fieldName - name of the field
      chars - char array to be written
      Throws:
      IOException - in case of any exceptional case
    • writeIntArray

      void writeIntArray(@Nonnull String fieldName, @Nullable int[] ints) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a primitive int-array.
      Parameters:
      fieldName - name of the field
      ints - int array to be written
      Throws:
      IOException - in case of any exceptional case
    • writeLongArray

      void writeLongArray(@Nonnull String fieldName, @Nullable long[] longs) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a primitive long-array.
      Parameters:
      fieldName - name of the field
      longs - long array to be written
      Throws:
      IOException - in case of any exceptional case
    • writeDoubleArray

      void writeDoubleArray(@Nonnull String fieldName, @Nullable double[] values) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a primitive double array.
      Parameters:
      fieldName - name of the field
      values - double array to be written
      Throws:
      IOException - in case of any exceptional case
    • writeFloatArray

      void writeFloatArray(@Nonnull String fieldName, @Nullable float[] values) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a primitive float array.
      Parameters:
      fieldName - name of the field
      values - float array to be written
      Throws:
      IOException - in case of any exceptional case
    • writeShortArray

      void writeShortArray(@Nonnull String fieldName, @Nullable short[] values) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a primitive short-array.
      Parameters:
      fieldName - name of the field
      values - short array to be written
      Throws:
      IOException - in case of any exceptional case
    • writeUTFArray

      @Deprecated void writeUTFArray(@Nonnull String fieldName, @Nullable String[] values) throws IOException
      Deprecated.
      for the sake of better naming. Use writeStringArray(String, String[]) instead.
      Writes a String-array.
      Parameters:
      fieldName - name of the field
      values - String array to be written
      Throws:
      IOException - in case of any exceptional case
    • writeStringArray

      void writeStringArray(@Nonnull String fieldName, @Nullable String[] values) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a String-array.
      Parameters:
      fieldName - name of the field
      values - String array to be written
      Throws:
      IOException - in case of any exceptional case
    • writePortableArray

      void writePortableArray(@Nonnull String fieldName, @Nullable Portable[] values) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes a an array of Portables.
      Parameters:
      fieldName - name of the field
      values - portable array to be written
      Throws:
      IOException - in case of any exceptional case
    • writeDecimalArray

      void writeDecimalArray(@Nonnull String fieldName, @Nullable BigDecimal[] values) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes an array of Decimals
      Parameters:
      fieldName - name of the field
      values - BigDecimal array to be written
      Throws:
      IOException - in case of any exceptional case
      See Also:
    • writeTimeArray

      void writeTimeArray(@Nonnull String fieldName, @Nullable LocalTime[] values) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes an array of Time's
      Parameters:
      fieldName - name of the field
      values - LocalTime array to be written
      Throws:
      IOException - in case of any exceptional case
      See Also:
    • writeDateArray

      void writeDateArray(@Nonnull String fieldName, @Nullable LocalDate[] values) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes an array of Date's
      Parameters:
      fieldName - name of the field
      values - LocalDate array to be written
      Throws:
      IOException - in case of any exceptional case
      See Also:
    • writeTimestampArray

      void writeTimestampArray(@Nonnull String fieldName, @Nullable LocalDateTime[] values) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes an array of Timestamp's
      Parameters:
      fieldName - name of the field
      values - LocalDateTime array to be written
      Throws:
      IOException - in case of any exceptional case
      See Also:
    • writeTimestampWithTimezoneArray

      void writeTimestampWithTimezoneArray(@Nonnull String fieldName, @Nullable OffsetDateTime[] values) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Writes an array of TimestampWithTimezone's
      Parameters:
      fieldName - name of the field
      values - OffsetDateTime array to be written
      Throws:
      IOException - in case of any exceptional case
      See Also:
    • getRawDataOutput

      @Nonnull ObjectDataOutput getRawDataOutput() throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      After writing portable fields one can subsequently write remaining fields in the old-fashioned way. Users should note that after calling this method, trying to write portable fields will result in an IOException.
      Returns:
      ObjectDataOutput
      Throws:
      IOException - in case of any exceptional case