org.apache.ignite.internal.binary

## Class BinaryWriterExImpl

- java.lang.Object
- - org.apache.ignite.internal.binary.BinaryWriterExImpl

All Implemented Interfaces:
  DataOutput, ObjectOutput, AutoCloseable, BinaryRawWriter, BinaryWriter, BinaryRawWriterEx

    public class BinaryWriterExImpl
    extends Object
    implements BinaryWriter, BinaryRawWriterEx, ObjectOutput

Binary writer implementation.

### Constructor Summary

Constructors
Constructor and Description
`BinaryWriterExImpl(BinaryContext ctx)`
`BinaryWriterExImpl(BinaryContext ctx, BinaryOutputStream out, BinaryWriterSchemaHolder schema, BinaryWriterHandles handles)`
`BinaryWriterExImpl(BinaryContext ctx, BinaryThreadLocalContext tlsCtx)`

### Method Summary

All Methods Instance Methods Concrete Methods
`byte[]` `array()`
`void` `close()` Close the writer releasing resources if necessary.
`BinaryContext` `context()`
`BinarySchema` `currentSchema()`
`void` `doWriteBinaryObject(BinaryObjectImpl po)`
`void` `doWriteDate(Date date)`
`void` `doWriteDecimal(BigDecimal val)`
`void` `doWriteObject(Object obj)` Write object.
`void` `doWriteProxy(Proxy proxy, Class<?>[] intfs)`
`void` `doWriteString(String val)`
`void` `doWriteTime(Time time)`
`void` `doWriteTimestamp(Timestamp ts)`
`void` `doWriteUuid(UUID uuid)`
`void` `flush()`
`BinaryWriterExImpl` `newWriter(int typeId)` Create new writer with same context.
`BinaryOutputStream` `out()`
`void` `popSchema()` Pop schema.
`void` `postWrite(boolean userType, boolean registered)` Perform post-write.
`void` `postWriteHashCode(String clsName)` Perform post-write hash code update if necessary.
`void` `preWrite(String clsName)` Perform pre-write.
`BinaryRawWriter` `rawWriter()` Gets raw writer.
`int` `reserveInt()` Reserve a room for an integer.
`int` `schemaId()`
`void` `schemaId(int schemaId)`
`void` `typeId(int typeId)`
`void` `write(byte[] val)`
`void` `write(byte[] val, int off, int len)`
`void` `write(int b)`
`void` `writeBoolean(boolean val)`
`void` `writeBoolean(String fieldName, boolean val)`
`void` `writeBooleanArray(boolean[] val)`
`void` `writeBooleanArray(String fieldName, boolean[] val)`
`void` `writeBooleanFieldPrimitive(boolean val)`
`void` `writeByte(byte val)`
`void` `writeByte(int v)`
`void` `writeByte(String fieldName, byte val)`
`void` `writeByteArray(byte[] val)`
`void` `writeByteArray(String fieldName, byte[] val)`
`void` `writeByteFieldPrimitive(byte val)`
`void` `writeBytes(String s)`
`void` `writeChar(char val)`
`void` `writeChar(int v)`
`void` `writeChar(String fieldName, char val)`
`void` `writeCharArray(char[] val)`
`void` `writeCharArray(String fieldName, char[] val)`
`void` `writeCharFieldPrimitive(char val)`
`void` `writeChars(String s)`
`<T> void` `writeCollection(Collection<T> col)`
`<T> void` `writeCollection(String fieldName, Collection<T> col)`
`void` `writeDate(Date val)`
`void` `writeDate(String fieldName, Date val)`
`void` `writeDateArray(Date[] val)`
`void` `writeDateArray(String fieldName, Date[] val)`
`void` `writeDecimal(BigDecimal val)`
`void` `writeDecimal(String fieldName, BigDecimal val)`
`void` `writeDecimalArray(BigDecimal[] val)`
`void` `writeDecimalArray(String fieldName, BigDecimal[] val)`
`void` `writeDouble(double val)`
`void` `writeDouble(String fieldName, double val)`
`void` `writeDoubleArray(double[] val)`
`void` `writeDoubleArray(String fieldName, double[] val)`
`void` `writeDoubleFieldPrimitive(double val)`
`<T extends Enum<?>> void` `writeEnum(String fieldName, T val)`
`<T extends Enum<?>> void` `writeEnum(T val)`
`<T extends Enum<?>> void` `writeEnumArray(String fieldName, T[] val)`
`<T extends Enum<?>> void` `writeEnumArray(T[] val)`
`void` `writeFieldId(int fieldId)` Write field ID.
`void` `writeFieldIdNoSchemaUpdate(int fieldId)` Write field ID without schema ID update.
`void` `writeFloat(float val)`
`void` `writeFloat(String fieldName, float val)`
`void` `writeFloatArray(float[] val)`
`void` `writeFloatArray(String fieldName, float[] val)`
`void` `writeFloatFieldPrimitive(float val)`
`void` `writeInt(int val)`
`void` `writeInt(int pos, int val)` Write int value at the specific position.
`void` `writeInt(String fieldName, int val)`
`void` `writeIntArray(int[] val)`
`void` `writeIntArray(String fieldName, int[] val)`
`void` `writeIntFieldPrimitive(int val)`
`void` `writeLong(long val)`
`void` `writeLong(String fieldName, long val)`
`void` `writeLongArray(long[] val)`
`void` `writeLongArray(String fieldName, long[] val)`
`void` `writeLongFieldPrimitive(long val)`
`<K,V> void` `writeMap(Map<K,V> map)`
`<K,V> void` `writeMap(String fieldName, Map<K,V> map)`
`void` `writeObject(Object obj)`
`void` `writeObject(String fieldName, Object obj)`
`void` `writeObjectArray(Object[] val)`
`void` `writeObjectArray(String fieldName, Object[] val)`
`void` `writeObjectDetached(Object obj)`
`void` `writeShort(int v)`
`void` `writeShort(short val)`
`void` `writeShort(String fieldName, short val)`
`void` `writeShortArray(short[] val)`
`void` `writeShortArray(String fieldName, short[] val)`
`void` `writeShortFieldPrimitive(short val)`
`void` `writeString(String val)`
`void` `writeString(String fieldName, String val)`
`void` `writeStringArray(String[] val)`
`void` `writeStringArray(String fieldName, String[] val)`
`void` `writeTime(String fieldName, Time val)`
`void` `writeTime(Time val)`
`void` `writeTimeArray(String fieldName, Time[] val)`
`void` `writeTimeArray(Time[] val)`
`void` `writeTimestamp(String fieldName, Timestamp val)`
`void` `writeTimestamp(Timestamp val)`
`void` `writeTimestampArray(String fieldName, Timestamp[] val)`
`void` `writeTimestampArray(Timestamp[] val)`
`void` `writeUTF(String s)`
`void` `writeUuid(String fieldName, UUID val)`
`void` `writeUuid(UUID val)`
`void` `writeUuidArray(String fieldName, UUID[] val)`
`void` `writeUuidArray(UUID[] val)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### BinaryWriterExImpl

    public BinaryWriterExImpl(BinaryContext ctx)

Parameters:
  `ctx` - Context.

#### BinaryWriterExImpl

    public BinaryWriterExImpl(BinaryContext ctx,
                              BinaryThreadLocalContext tlsCtx)

Parameters:
  `ctx` - Context.
  `tlsCtx` - TLS context.

#### BinaryWriterExImpl

    public BinaryWriterExImpl(BinaryContext ctx,
                              BinaryOutputStream out,
                              BinaryWriterSchemaHolder schema,
                              BinaryWriterHandles handles)

Parameters:
  `ctx` - Context.
  `out` - Output stream.
  `handles` - Handles.

### Method Detail

#### typeId

    public void typeId(int typeId)

Parameters:
  `typeId` - Type ID.

#### close

    public void close()

Close the writer releasing resources if necessary.

Specified by:
  `close` in interface `ObjectOutput`
Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `BinaryRawWriterEx`

#### array

    public byte[] array()

Returns:
  Array.

#### preWrite

    public void preWrite(@Nullable
                         String clsName)

Perform pre-write. Reserves space for header and writes class name if needed.

Parameters:
  `clsName` - Class name (optional).

#### postWrite

    public void postWrite(boolean userType,
                          boolean registered)

Perform post-write. Fills object header.

Parameters:
  `userType` - User type flag.
  `registered` - Whether type is registered.

#### postWriteHashCode

    public void postWriteHashCode(@Nullable
                                  String clsName)

Perform post-write hash code update if necessary.

Parameters:
  `clsName` - Class name. Always null if class is registered.

#### popSchema

    public void popSchema()

Pop schema.

#### write

    public void write(byte[] val)

Specified by:
  `write` in interface `DataOutput`
Specified by:
  `write` in interface `ObjectOutput`
Parameters:
  `val` - Byte array.

#### write

    public void write(byte[] val,
                      int off,
                      int len)

Specified by:
  `write` in interface `DataOutput`
Specified by:
  `write` in interface `ObjectOutput`
Parameters:
  `val` - Byte array.
  `off` - Offset.
  `len` - Length.

#### doWriteDecimal

    public void doWriteDecimal(@Nullable
                               BigDecimal val)

Parameters:
  `val` - String value.

#### doWriteString

    public void doWriteString(@Nullable
                              String val)

Parameters:
  `val` - String value.

#### doWriteUuid

    public void doWriteUuid(@Nullable
                            UUID uuid)

Parameters:
  `uuid` - UUID.

#### doWriteDate

    public void doWriteDate(@Nullable
                            Date date)

Parameters:
  `date` - Date.

#### doWriteTimestamp

    public void doWriteTimestamp(@Nullable
                                 Timestamp ts)

Parameters:
  `ts` - Timestamp.

#### doWriteTime

    public void doWriteTime(@Nullable
                            Time time)

Parameters:
  `time` - Time.

#### doWriteObject

    public void doWriteObject(@Nullable
                              Object obj)
                       throws BinaryObjectException

Write object.

Parameters:
  `obj` - Object.
Throws:
  `BinaryObjectException` - In case of error.

#### doWriteProxy

    public void doWriteProxy(Proxy proxy,
                             Class<?>[] intfs)

Parameters:
  `proxy` - Proxy.

#### doWriteBinaryObject

    public void doWriteBinaryObject(@Nullable
                                    BinaryObjectImpl po)

Parameters:
  `po` - Binary object.

#### writeByteFieldPrimitive

    public void writeByteFieldPrimitive(byte val)

Parameters:
  `val` - Value.

#### writeShortFieldPrimitive

    public void writeShortFieldPrimitive(short val)

Parameters:
  `val` - Value.

#### writeIntFieldPrimitive

    public void writeIntFieldPrimitive(int val)

Parameters:
  `val` - Value.

#### writeLongFieldPrimitive

    public void writeLongFieldPrimitive(long val)

Parameters:
  `val` - Value.

#### writeFloatFieldPrimitive

    public void writeFloatFieldPrimitive(float val)

Parameters:
  `val` - Value.

#### writeDoubleFieldPrimitive

    public void writeDoubleFieldPrimitive(double val)

Parameters:
  `val` - Value.

#### writeCharFieldPrimitive

    public void writeCharFieldPrimitive(char val)

Parameters:
  `val` - Value.

#### writeBooleanFieldPrimitive

    public void writeBooleanFieldPrimitive(boolean val)

Parameters:
  `val` - Value.

#### writeByte

    public void writeByte(String fieldName,
                          byte val)
                   throws BinaryObjectException

Specified by:
  `writeByte` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeByte

    public void writeByte(byte val)
                   throws BinaryObjectException

Specified by:
  `writeByte` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeShort

    public void writeShort(String fieldName,
                           short val)
                    throws BinaryObjectException

Specified by:
  `writeShort` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeShort

    public void writeShort(short val)
                    throws BinaryObjectException

Specified by:
  `writeShort` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeInt

    public void writeInt(String fieldName,
                         int val)
                  throws BinaryObjectException

Specified by:
  `writeInt` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeInt

    public void writeInt(int val)
                  throws BinaryObjectException

Specified by:
  `writeInt` in interface `DataOutput`
Specified by:
  `writeInt` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeLong

    public void writeLong(String fieldName,
                          long val)
                   throws BinaryObjectException

Specified by:
  `writeLong` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeLong

    public void writeLong(long val)
                   throws BinaryObjectException

Specified by:
  `writeLong` in interface `DataOutput`
Specified by:
  `writeLong` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeFloat

    public void writeFloat(String fieldName,
                           float val)
                    throws BinaryObjectException

Specified by:
  `writeFloat` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeFloat

    public void writeFloat(float val)
                    throws BinaryObjectException

Specified by:
  `writeFloat` in interface `DataOutput`
Specified by:
  `writeFloat` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeDouble

    public void writeDouble(String fieldName,
                            double val)
                     throws BinaryObjectException

Specified by:
  `writeDouble` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeDouble

    public void writeDouble(double val)
                     throws BinaryObjectException

Specified by:
  `writeDouble` in interface `DataOutput`
Specified by:
  `writeDouble` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeChar

    public void writeChar(String fieldName,
                          char val)
                   throws BinaryObjectException

Specified by:
  `writeChar` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeChar

    public void writeChar(char val)
                   throws BinaryObjectException

Specified by:
  `writeChar` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeBoolean

    public void writeBoolean(String fieldName,
                             boolean val)
                      throws BinaryObjectException

Specified by:
  `writeBoolean` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeBoolean

    public void writeBoolean(boolean val)
                      throws BinaryObjectException

Specified by:
  `writeBoolean` in interface `DataOutput`
Specified by:
  `writeBoolean` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeDecimal

    public void writeDecimal(String fieldName,
                             @Nullable
                             BigDecimal val)
                      throws BinaryObjectException

Specified by:
  `writeDecimal` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeDecimal

    public void writeDecimal(@Nullable
                             BigDecimal val)
                      throws BinaryObjectException

Specified by:
  `writeDecimal` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeString

    public void writeString(String fieldName,
                            @Nullable
                            String val)
                     throws BinaryObjectException

Specified by:
  `writeString` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeString

    public void writeString(@Nullable
                            String val)
                     throws BinaryObjectException

Specified by:
  `writeString` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeUuid

    public void writeUuid(String fieldName,
                          @Nullable
                          UUID val)
                   throws BinaryObjectException

Specified by:
  `writeUuid` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - UUID to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeUuid

    public void writeUuid(@Nullable
                          UUID val)
                   throws BinaryObjectException

Specified by:
  `writeUuid` in interface `BinaryRawWriter`
Parameters:
  `val` - UUID to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeDate

    public void writeDate(String fieldName,
                          @Nullable
                          Date val)
                   throws BinaryObjectException

Specified by:
  `writeDate` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Date to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeDate

    public void writeDate(@Nullable
                          Date val)
                   throws BinaryObjectException

Specified by:
  `writeDate` in interface `BinaryRawWriter`
Parameters:
  `val` - Date to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeTimestamp

    public void writeTimestamp(String fieldName,
                               @Nullable
                               Timestamp val)
                        throws BinaryObjectException

Specified by:
  `writeTimestamp` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Timestamp to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeTimestamp

    public void writeTimestamp(@Nullable
                               Timestamp val)
                        throws BinaryObjectException

Specified by:
  `writeTimestamp` in interface `BinaryRawWriter`
Parameters:
  `val` - Timestamp to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeTime

    public void writeTime(String fieldName,
                          @Nullable
                          Time val)
                   throws BinaryObjectException

Specified by:
  `writeTime` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Time to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeTime

    public void writeTime(@Nullable
                          Time val)
                   throws BinaryObjectException

Specified by:
  `writeTime` in interface `BinaryRawWriter`
Parameters:
  `val` - Time to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeObject

    public void writeObject(String fieldName,
                            @Nullable
                            Object obj)
                     throws BinaryObjectException

Specified by:
  `writeObject` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `obj` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeObject

    public void writeObject(@Nullable
                            Object obj)
                     throws BinaryObjectException

Specified by:
  `writeObject` in interface `ObjectOutput`
Specified by:
  `writeObject` in interface `BinaryRawWriter`
Parameters:
  `obj` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeObjectDetached

    public void writeObjectDetached(@Nullable
                                    Object obj)
                             throws BinaryObjectException

Specified by:
  `writeObjectDetached` in interface `BinaryRawWriterEx`
Parameters:
  `obj` - Object to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeByteArray

    public void writeByteArray(String fieldName,
                               @Nullable
                               byte[] val)
                        throws BinaryObjectException

Specified by:
  `writeByteArray` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeByteArray

    public void writeByteArray(@Nullable
                               byte[] val)
                        throws BinaryObjectException

Specified by:
  `writeByteArray` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeShortArray

    public void writeShortArray(String fieldName,
                                @Nullable
                                short[] val)
                         throws BinaryObjectException

Specified by:
  `writeShortArray` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeShortArray

    public void writeShortArray(@Nullable
                                short[] val)
                         throws BinaryObjectException

Specified by:
  `writeShortArray` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeIntArray

    public void writeIntArray(String fieldName,
                              @Nullable
                              int[] val)
                       throws BinaryObjectException

Specified by:
  `writeIntArray` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeIntArray

    public void writeIntArray(@Nullable
                              int[] val)
                       throws BinaryObjectException

Specified by:
  `writeIntArray` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeLongArray

    public void writeLongArray(String fieldName,
                               @Nullable
                               long[] val)
                        throws BinaryObjectException

Specified by:
  `writeLongArray` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeLongArray

    public void writeLongArray(@Nullable
                               long[] val)
                        throws BinaryObjectException

Specified by:
  `writeLongArray` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeFloatArray

    public void writeFloatArray(String fieldName,
                                @Nullable
                                float[] val)
                         throws BinaryObjectException

Specified by:
  `writeFloatArray` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeFloatArray

    public void writeFloatArray(@Nullable
                                float[] val)
                         throws BinaryObjectException

Specified by:
  `writeFloatArray` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeDoubleArray

    public void writeDoubleArray(String fieldName,
                                 @Nullable
                                 double[] val)
                          throws BinaryObjectException

Specified by:
  `writeDoubleArray` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeDoubleArray

    public void writeDoubleArray(@Nullable
                                 double[] val)
                          throws BinaryObjectException

Specified by:
  `writeDoubleArray` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeCharArray

    public void writeCharArray(String fieldName,
                               @Nullable
                               char[] val)
                        throws BinaryObjectException

Specified by:
  `writeCharArray` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeCharArray

    public void writeCharArray(@Nullable
                               char[] val)
                        throws BinaryObjectException

Specified by:
  `writeCharArray` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeBooleanArray

    public void writeBooleanArray(String fieldName,
                                  @Nullable
                                  boolean[] val)
                           throws BinaryObjectException

Specified by:
  `writeBooleanArray` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeBooleanArray

    public void writeBooleanArray(@Nullable
                                  boolean[] val)
                           throws BinaryObjectException

Specified by:
  `writeBooleanArray` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeDecimalArray

    public void writeDecimalArray(String fieldName,
                                  @Nullable
                                  BigDecimal[] val)
                           throws BinaryObjectException

Specified by:
  `writeDecimalArray` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeDecimalArray

    public void writeDecimalArray(@Nullable
                                  BigDecimal[] val)
                           throws BinaryObjectException

Specified by:
  `writeDecimalArray` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeStringArray

    public void writeStringArray(String fieldName,
                                 @Nullable
                                 String[] val)
                          throws BinaryObjectException

Specified by:
  `writeStringArray` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeStringArray

    public void writeStringArray(@Nullable
                                 String[] val)
                          throws BinaryObjectException

Specified by:
  `writeStringArray` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeUuidArray

    public void writeUuidArray(String fieldName,
                               @Nullable
                               UUID[] val)
                        throws BinaryObjectException

Specified by:
  `writeUuidArray` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeUuidArray

    public void writeUuidArray(@Nullable
                               UUID[] val)
                        throws BinaryObjectException

Specified by:
  `writeUuidArray` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeDateArray

    public void writeDateArray(String fieldName,
                               @Nullable
                               Date[] val)
                        throws BinaryObjectException

Specified by:
  `writeDateArray` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeDateArray

    public void writeDateArray(@Nullable
                               Date[] val)
                        throws BinaryObjectException

Specified by:
  `writeDateArray` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeTimestampArray

    public void writeTimestampArray(String fieldName,
                                    @Nullable
                                    Timestamp[] val)
                             throws BinaryObjectException

Specified by:
  `writeTimestampArray` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeTimestampArray

    public void writeTimestampArray(@Nullable
                                    Timestamp[] val)
                             throws BinaryObjectException

Specified by:
  `writeTimestampArray` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeTimeArray

    public void writeTimeArray(String fieldName,
                               @Nullable
                               Time[] val)
                        throws BinaryObjectException

Specified by:
  `writeTimeArray` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeTimeArray

    public void writeTimeArray(@Nullable
                               Time[] val)
                        throws BinaryObjectException

Specified by:
  `writeTimeArray` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeObjectArray

    public void writeObjectArray(String fieldName,
                                 @Nullable
                                 Object[] val)
                          throws BinaryObjectException

Specified by:
  `writeObjectArray` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeObjectArray

    public void writeObjectArray(@Nullable
                                 Object[] val)
                          throws BinaryObjectException

Specified by:
  `writeObjectArray` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeCollection

    public <T> void writeCollection(String fieldName,
                                    @Nullable
                                    Collection<T> col)
                             throws BinaryObjectException

Specified by:
  `writeCollection` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `col` - Collection to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeCollection

    public <T> void writeCollection(@Nullable
                                    Collection<T> col)
                             throws BinaryObjectException

Specified by:
  `writeCollection` in interface `BinaryRawWriter`
Parameters:
  `col` - Collection to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeMap

    public <K,V> void writeMap(String fieldName,
                               @Nullable
                               Map<K,V> map)
                        throws BinaryObjectException

Specified by:
  `writeMap` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `map` - Map to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeMap

    public <K,V> void writeMap(@Nullable
                               Map<K,V> map)
                        throws BinaryObjectException

Specified by:
  `writeMap` in interface `BinaryRawWriter`
Parameters:
  `map` - Map to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeEnum

    public <T extends Enum<?>> void writeEnum(String fieldName,
                                              T val)
                                       throws BinaryObjectException

Specified by:
  `writeEnum` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeEnum

    public <T extends Enum<?>> void writeEnum(T val)
                                       throws BinaryObjectException

Specified by:
  `writeEnum` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeEnumArray

    public <T extends Enum<?>> void writeEnumArray(String fieldName,
                                                   T[] val)
                                            throws BinaryObjectException

Specified by:
  `writeEnumArray` in interface `BinaryWriter`
Parameters:
  `fieldName` - Field name.
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### writeEnumArray

    public <T extends Enum<?>> void writeEnumArray(T[] val)
                                            throws BinaryObjectException

Specified by:
  `writeEnumArray` in interface `BinaryRawWriter`
Parameters:
  `val` - Value to write.
Throws:
  `BinaryObjectException` - In case of error.

#### rawWriter

    public BinaryRawWriter rawWriter()

Gets raw writer. Raw writer does not write field name hash codes, therefore, making the format even more compact. However, if the raw writer is used, dynamic structure changes to the binary objects are not supported.

Specified by:
  `rawWriter` in interface `BinaryWriter`
Returns:
  Raw writer.

#### out

    public BinaryOutputStream out()

Specified by:
  `out` in interface `BinaryRawWriterEx`
Returns:
  Output stream.

#### writeBytes

    public void writeBytes(String s)
                    throws IOException

Specified by:
  `writeBytes` in interface `DataOutput`
Throws:
  `IOException`

#### writeChars

    public void writeChars(String s)
                    throws IOException

Specified by:
  `writeChars` in interface `DataOutput`
Throws:
  `IOException`

#### writeUTF

    public void writeUTF(String s)
                  throws IOException

Specified by:
  `writeUTF` in interface `DataOutput`
Throws:
  `IOException`

#### writeByte

    public void writeByte(int v)
                   throws IOException

Specified by:
  `writeByte` in interface `DataOutput`
Throws:
  `IOException`

#### writeShort

    public void writeShort(int v)
                    throws IOException

Specified by:
  `writeShort` in interface `DataOutput`
Throws:
  `IOException`

#### writeChar

    public void writeChar(int v)
                   throws IOException

Specified by:
  `writeChar` in interface `DataOutput`
Throws:
  `IOException`

#### write

    public void write(int b)
               throws IOException

Specified by:
  `write` in interface `DataOutput`
Specified by:
  `write` in interface `ObjectOutput`
Throws:
  `IOException`

#### flush

    public void flush()
               throws IOException

Specified by:
  `flush` in interface `ObjectOutput`
Throws:
  `IOException`

#### reserveInt

    public int reserveInt()

Reserve a room for an integer.

Specified by:
  `reserveInt` in interface `BinaryRawWriterEx`
Returns:
  Position in the stream where value is to be written.

#### writeInt

    public void writeInt(int pos,
                         int val)
                  throws BinaryObjectException

Write int value at the specific position.

Specified by:
  `writeInt` in interface `BinaryRawWriterEx`
Parameters:
  `pos` - Position.
  `val` - Value.
Throws:
  `BinaryObjectException` - If failed.

#### writeFieldId

    public void writeFieldId(int fieldId)

Write field ID.

Parameters:
  `fieldId` - Field ID.

#### writeFieldIdNoSchemaUpdate

    public void writeFieldIdNoSchemaUpdate(int fieldId)

Write field ID without schema ID update. This method should be used when schema ID is stable because class is seializable.

Parameters:
  `fieldId` - Field ID.

#### schemaId

    public void schemaId(int schemaId)

Parameters:
  `schemaId` - Schema ID.

#### schemaId

    public int schemaId()

Returns:
  Schema ID.

#### currentSchema

    public BinarySchema currentSchema()

Returns:
  Current writer's schema.

#### newWriter

    public BinaryWriterExImpl newWriter(int typeId)

Create new writer with same context.

Parameters:
  `typeId` - type
Returns:
  New writer.

#### context

    public BinaryContext context()

Returns:
  Binary context.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.5.0
Release Date | : May 23 2018