Interface PortableReader


@Deprecated(since="5.4", forRemoval=true) public interface PortableReader
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 reading portable fields from binary data in the form of java primitives, arrays of java primitives, nested portable fields and array of portable fields.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    getFieldType(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    hasField(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    readBoolean(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean[]
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    byte
    readByte(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    byte[]
    readByteArray(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    char
    readChar(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    char[]
    readCharArray(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    readDate(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reads a date field consisting of year, month of the year and day of the month to LocalDate
    readDateArray(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reads an array of Date's to LocalDate[]
    readDecimal(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reads a decimal which is arbitrary precision and scale floating-point number to BigDecimal
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reads an array of Decimal's to BigDecimal[]
    double
    readDouble(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    double[]
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    float
    readFloat(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    float[]
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int
    readInt(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    int[]
    readIntArray(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    long
    readLong(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    long[]
    readLongArray(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    <P extends Portable>
    P
    readPortable(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    short
    readShort(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    short[]
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    readString(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    readTime(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reads a time field consisting of hour, minute, seconds and nanos parts to LocalTime
    readTimeArray(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reads an array of Time's to LocalTime[]
    readTimestamp(String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reads a timestamp field consisting of year, month of the year, day of the month, hour, minute, seconds, nanos parts to LocalDateTime
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reads an array of Timestamp's to LocalDateTime[]
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reads a timestamp with timezone field consisting of year, month of the year, day of the month, offset seconds, hour, minute, seconds, nanos parts to OffsetDateTime
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reads an array of TimestampWithTimezone's to OffsetDateTime[]
    readUTF(String fieldName)
    Deprecated.
    for the sake of better naming.
    readUTFArray(String fieldName)
    Deprecated.
    for the sake of better naming.
  • Method Details

    • getVersion

      int getVersion()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      global version of portable classes
    • hasField

      boolean hasField(@Nonnull String fieldName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field (does not support nested paths)
      Returns:
      true if field exist in this class.
    • getFieldNames

      @Nonnull Set<String> getFieldNames()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      set of field names on this portable class
    • getFieldType

      @Nonnull FieldType getFieldType(@Nonnull String fieldName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      field type of given fieldName
      Throws:
      IllegalArgumentException - if the field does not exist.
    • getFieldClassId

      int getFieldClassId(@Nonnull String fieldName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      classId of given field
    • readInt

      int readInt(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the int value read
      Throws:
      IOException - in case of any exceptional case
    • readLong

      long readLong(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the long value read
      Throws:
      IOException - in case of any exceptional case
    • readUTF

      @Nullable @Deprecated String readUTF(@Nonnull String fieldName) throws IOException
      Deprecated.
      for the sake of better naming. Use readString(String) instead
      Parameters:
      fieldName - name of the field
      Returns:
      the utf string value read
      Throws:
      IOException - in case of any exceptional case
    • readString

      @Nullable String readString(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the string value read
      Throws:
      IOException - in case of any exceptional case
    • readBoolean

      boolean readBoolean(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the boolean value read
      Throws:
      IOException - in case of any exceptional case
    • readByte

      byte readByte(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the byte value read
      Throws:
      IOException - in case of any exceptional case
    • readChar

      char readChar(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the char value read
      Throws:
      IOException - in case of any exceptional case
    • readDouble

      double readDouble(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the double value read
      Throws:
      IOException - in case of any exceptional case
    • readFloat

      float readFloat(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the float value read
      Throws:
      IOException - in case of any exceptional case
    • readShort

      short readShort(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the short value read
      Throws:
      IOException - in case of any exceptional case
    • readPortable

      @Nullable <P extends Portable> P readPortable(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Type Parameters:
      P - the type of the portable read
      Parameters:
      fieldName - name of the field
      Returns:
      the portable value read
      Throws:
      IOException - in case of any exceptional case
    • readDecimal

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

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

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

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

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

      @Nullable byte[] readByteArray(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the byte array value read
      Throws:
      IOException - in case of any exceptional case
    • readBooleanArray

      @Nullable boolean[] readBooleanArray(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the boolean array value read
      Throws:
      IOException - in case of any exceptional case
    • readCharArray

      @Nullable char[] readCharArray(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the char array value read
      Throws:
      IOException - in case of any exceptional case
    • readIntArray

      @Nullable int[] readIntArray(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the int array value read
      Throws:
      IOException - in case of any exceptional case
    • readLongArray

      @Nullable long[] readLongArray(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the long array value read
      Throws:
      IOException - in case of any exceptional case
    • readDoubleArray

      @Nullable double[] readDoubleArray(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the double array value read
      Throws:
      IOException - in case of any exceptional case
    • readFloatArray

      @Nullable float[] readFloatArray(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the float array value read
      Throws:
      IOException - in case of any exceptional case
    • readShortArray

      short[] readShortArray(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the short array value read
      Throws:
      IOException - in case of any exceptional case
    • readUTFArray

      @Nullable @Deprecated String[] readUTFArray(@Nonnull String fieldName) throws IOException
      Deprecated.
      for the sake of better naming. Use readStringArray(String) instead
      Parameters:
      fieldName - name of the field
      Returns:
      the String array value read
      Throws:
      IOException - in case of any exceptional case
    • readStringArray

      @Nullable String[] readStringArray(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the String array value read
      Throws:
      IOException - in case of any exceptional case
    • readPortableArray

      @Nullable Portable[] readPortableArray(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      fieldName - name of the field
      Returns:
      the portable array read
      Throws:
      IOException - in case of any exceptional case
    • readDecimalArray

      @Nullable BigDecimal[] readDecimalArray(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads an array of Decimal's to BigDecimal[]
      Parameters:
      fieldName - name of the field
      Returns:
      the BigDecimal array read
      Throws:
      IOException - in case of any exceptional case
      See Also:
    • readTimeArray

      @Nullable LocalTime[] readTimeArray(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads an array of Time's to LocalTime[]
      Parameters:
      fieldName - name of the field
      Returns:
      the LocalTime array read
      Throws:
      IOException - in case of any exceptional case
      See Also:
    • readDateArray

      @Nullable LocalDate[] readDateArray(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads an array of Date's to LocalDate[]
      Parameters:
      fieldName - name of the field
      Returns:
      the LocalDate array read
      Throws:
      IOException - in case of any exceptional case
      See Also:
    • readTimestampArray

      @Nullable LocalDateTime[] readTimestampArray(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads an array of Timestamp's to LocalDateTime[]
      Parameters:
      fieldName - name of the field
      Returns:
      the LocalDateTime array read
      Throws:
      IOException - in case of any exceptional case
      See Also:
    • readTimestampWithTimezoneArray

      @Nullable OffsetDateTime[] readTimestampWithTimezoneArray(@Nonnull String fieldName) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Reads an array of TimestampWithTimezone's to OffsetDateTime[]
      Parameters:
      fieldName - name of the field
      Returns:
      the OffsetDateTime array read
      Throws:
      IOException - in case of any exceptional case
      See Also:
    • getRawDataInput

      @Nonnull ObjectDataInput getRawDataInput() throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      PortableWriter.getRawDataOutput().

      Note that portable fields can not be read after this method is called. If this happens, an IOException will be thrown.

      Returns:
      rawDataInput
      Throws:
      IOException - in case of any exceptional case