Package com.hazelcast.nio.serialization
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 TypeMethodDescriptionDeprecated, 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.voidwriteBoolean(String fieldName, boolean value) Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive boolean.voidwriteBooleanArray(String fieldName, boolean[] booleans) Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive boolean-array.voidDeprecated, for removal: This API element is subject to removal in a future version.Writes a primitive byte.voidwriteByteArray(String fieldName, byte[] bytes) Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive byte-array.voidDeprecated, for removal: This API element is subject to removal in a future version.Writes a primitive char.voidwriteCharArray(String fieldName, char[] chars) Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive char-array.voidDeprecated, 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 monthvoidwriteDateArray(String fieldName, LocalDate[] values) Deprecated, for removal: This API element is subject to removal in a future version.Writes an array of Date'svoidwriteDecimal(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 numbervoidwriteDecimalArray(String fieldName, BigDecimal[] values) Deprecated, for removal: This API element is subject to removal in a future version.Writes an array of DecimalsvoidwriteDouble(String fieldName, double value) Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive double.voidwriteDoubleArray(String fieldName, double[] values) Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive double array.voidwriteFloat(String fieldName, float value) Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive float.voidwriteFloatArray(String fieldName, float[] values) Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive float array.voidDeprecated, for removal: This API element is subject to removal in a future version.Writes a primitive int.voidwriteIntArray(String fieldName, int[] ints) Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive int-array.voidDeprecated, for removal: This API element is subject to removal in a future version.Writes a primitive long.voidwriteLongArray(String fieldName, long[] longs) Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive long-array.voidwriteNullPortable(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.voidwritePortable(String fieldName, Portable portable) Deprecated, for removal: This API element is subject to removal in a future version.Writes a Portable.voidwritePortableArray(String fieldName, Portable[] values) Deprecated, for removal: This API element is subject to removal in a future version.Writes a an array of Portables.voidwriteShort(String fieldName, short value) Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive short.voidwriteShortArray(String fieldName, short[] values) Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive short-array.voidwriteString(String fieldName, String value) Deprecated, for removal: This API element is subject to removal in a future version.Writes an UTF string.voidwriteStringArray(String fieldName, String[] values) Deprecated, for removal: This API element is subject to removal in a future version.Writes a String-array.voidDeprecated, for removal: This API element is subject to removal in a future version.Write a time field consisting of hour, minute, seconds and nanos partsvoidwriteTimeArray(String fieldName, LocalTime[] values) Deprecated, for removal: This API element is subject to removal in a future version.Writes an array of Time'svoidwriteTimestamp(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 partsvoidwriteTimestampArray(String fieldName, LocalDateTime[] values) Deprecated, for removal: This API element is subject to removal in a future version.Writes an array of Timestamp'svoidwriteTimestampWithTimezone(String fieldName, OffsetDateTime value) 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 partsvoidwriteTimestampWithTimezoneArray(String fieldName, OffsetDateTime[] values) Deprecated, for removal: This API element is subject to removal in a future version.Writes an array of TimestampWithTimezone'svoidDeprecated.for the sake of better naming.voidwriteUTFArray(String fieldName, String[] values) Deprecated.for the sake of better naming.
-
Method Details
-
writeInt
Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive int.- Parameters:
fieldName- name of the fieldvalue- int value to be written- Throws:
IOException- in case of any exceptional case
-
writeLong
Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive long.- Parameters:
fieldName- name of the fieldvalue- long value to be written- Throws:
IOException- in case of any exceptional case
-
writeUTF
Deprecated.for the sake of better naming. UsewriteString(String, String)instead.Writes an UTF string.- Parameters:
fieldName- name of the fieldvalue- utf string value to be written- Throws:
IOException- in case of any exceptional case
-
writeString
Deprecated, for removal: This API element is subject to removal in a future version.Writes an UTF string.- Parameters:
fieldName- name of the fieldvalue- utf string value to be written- Throws:
IOException- in case of any exceptional case
-
writeBoolean
Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive boolean.- Parameters:
fieldName- name of the fieldvalue- int value to be written- Throws:
IOException- in case of any exceptional case
-
writeByte
Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive byte.- Parameters:
fieldName- name of the fieldvalue- int value to be written- Throws:
IOException- in case of any exceptional case
-
writeChar
Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive char.- Parameters:
fieldName- name of the fieldvalue- int value to be written- Throws:
IOException- in case of any exceptional case
-
writeDouble
Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive double.- Parameters:
fieldName- name of the fieldvalue- int value to be written- Throws:
IOException- in case of any exceptional case
-
writeFloat
Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive float.- Parameters:
fieldName- name of the fieldvalue- int value to be written- Throws:
IOException- in case of any exceptional case
-
writeShort
Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive short.- Parameters:
fieldName- name of the fieldvalue- int value to be written- Throws:
IOException- in case of any exceptional case
-
writePortable
Deprecated, for removal: This API element is subject to removal in a future version.Writes a Portable. UsewriteNullPortable(String, int, int)to write anullPortable- Parameters:
fieldName- name of the fieldportable- Portable to be written- Throws:
IOException- in case of any exceptional case
-
writeNullPortable
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 fieldfactoryId- factory ID of related portable classclassId- class ID of related portable class- Throws:
IOException- in case of any exceptional case
-
writeDecimal
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 fieldvalue- BigDecimal value to be written- Throws:
IOException- in case of any exceptional case
-
writeTime
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 fieldvalue- LocalTime value to be written- Throws:
IOException- in case of any exceptional case
-
writeDate
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 fieldvalue- LocalDate value to be written- Throws:
IOException- in case of any exceptional case
-
writeTimestamp
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 fieldvalue- 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 fieldvalue- OffsetDateTime value to be written- Throws:
IOException- in case of any exceptional case
-
writeByteArray
Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive byte-array.- Parameters:
fieldName- name of the fieldbytes- byte array to be written- Throws:
IOException- in case of any exceptional case
-
writeBooleanArray
Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive boolean-array.- Parameters:
fieldName- name of the fieldbooleans- boolean array to be written- Throws:
IOException- in case of any exceptional case
-
writeCharArray
Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive char-array.- Parameters:
fieldName- name of the fieldchars- char array to be written- Throws:
IOException- in case of any exceptional case
-
writeIntArray
Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive int-array.- Parameters:
fieldName- name of the fieldints- int array to be written- Throws:
IOException- in case of any exceptional case
-
writeLongArray
Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive long-array.- Parameters:
fieldName- name of the fieldlongs- long array to be written- Throws:
IOException- in case of any exceptional case
-
writeDoubleArray
Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive double array.- Parameters:
fieldName- name of the fieldvalues- double array to be written- Throws:
IOException- in case of any exceptional case
-
writeFloatArray
Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive float array.- Parameters:
fieldName- name of the fieldvalues- float array to be written- Throws:
IOException- in case of any exceptional case
-
writeShortArray
Deprecated, for removal: This API element is subject to removal in a future version.Writes a primitive short-array.- Parameters:
fieldName- name of the fieldvalues- 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. UsewriteStringArray(String, String[])instead.Writes a String-array.- Parameters:
fieldName- name of the fieldvalues- String array to be written- Throws:
IOException- in case of any exceptional case
-
writeStringArray
Deprecated, for removal: This API element is subject to removal in a future version.Writes a String-array.- Parameters:
fieldName- name of the fieldvalues- String array to be written- Throws:
IOException- in case of any exceptional case
-
writePortableArray
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 fieldvalues- portable array to be written- Throws:
IOException- in case of any exceptional case
-
writeDecimalArray
Deprecated, for removal: This API element is subject to removal in a future version.Writes an array of Decimals- Parameters:
fieldName- name of the fieldvalues- BigDecimal array to be written- Throws:
IOException- in case of any exceptional case- See Also:
-
writeTimeArray
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 fieldvalues- LocalTime array to be written- Throws:
IOException- in case of any exceptional case- See Also:
-
writeDateArray
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 fieldvalues- 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 fieldvalues- 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 fieldvalues- OffsetDateTime array to be written- Throws:
IOException- in case of any exceptional case- See Also:
-
getRawDataOutput
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
-