org.apache.ignite.internal.portable

## Class PortableWriterExImpl

- java.lang.Object
- - org.apache.ignite.internal.portable.PortableWriterExImpl

All Implemented Interfaces:
  DataOutput, ObjectOutput, AutoCloseable, PortableRawWriter, PortableWriter, PortableRawWriterEx

    public class PortableWriterExImpl
    extends Object
    implements PortableWriter, PortableRawWriterEx, ObjectOutput

Portable writer implementation.

### Constructor Summary

Constructors
Constructor and Description
`PortableWriterExImpl(PortableContext ctx, int off, int typeId, boolean metaEnabled)`

### Method Summary

Methods
`byte[]` `array()`
`void` `close()` Close the writer releasing resources if necessary.
`PortableContext` `context()`
`void` `doWriteBoolean(boolean val)`
`void` `doWriteByte(byte val)`
`void` `doWriteChar(char val)`
`void` `doWriteDate(Date date)`
`void` `doWriteDecimal(BigDecimal val)`
`void` `doWriteDouble(double val)`
`void` `doWriteFloat(float val)`
`void` `doWriteInt(int val)`
`void` `doWriteLong(long val)`
`void` `doWriteObject(Object obj, boolean detached)`
`void` `doWritePortableObject(PortableObjectImpl po)`
`void` `doWriteShort(short val)`
`void` `doWriteString(String val)`
`void` `doWriteTimestamp(Timestamp ts)`
`void` `doWriteUuid(UUID uuid)`
`void` `flush()`
`PortableWriterExImpl` `newWriter(int typeId)` Create new writer with same context.
`PortableOutputStream` `out()`
`PortableOutputStream` `outputStream()`
`PortableRawWriter` `rawWriter()` Gets raw writer.
`int` `reserve(int bytes)`
`int` `reserveAndMark(int bytes)`
`int` `reserveInt()` Reserve a room for an integer.
`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` `writeByte(byte val)`
`void` `writeByte(int v)`
`void` `writeByte(String fieldName, byte val)`
`void` `writeByteArray(byte[] val)`
`void` `writeByteArray(String fieldName, 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` `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` `writeDelta(int off)`
`void` `writeDouble(double val)`
`void` `writeDouble(String fieldName, double val)`
`void` `writeDoubleArray(double[] val)`
`void` `writeDoubleArray(String fieldName, 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` `writeFloat(float val)`
`void` `writeFloat(String fieldName, float val)`
`void` `writeFloatArray(float[] val)`
`void` `writeFloatArray(String fieldName, 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` `writeLength()`
`void` `writeLong(long val)`
`void` `writeLong(String fieldName, long val)`
`void` `writeLongArray(long[] val)`
`void` `writeLongArray(String fieldName, 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` `writeRawOffsetIfNeeded()`
`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` `writeString(String val)`
`void` `writeString(String fieldName, String val)`
`void` `writeStringArray(String[] val)`
`void` `writeStringArray(String fieldName, String[] val)`
`void` `writeTimestamp(String fieldName, Timestamp val)`
`void` `writeTimestamp(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

#### PortableWriterExImpl

    public PortableWriterExImpl(PortableContext ctx,
                        int off,
                        int typeId,
                        boolean metaEnabled)

Parameters:
  `ctx` - Context.
  `off` - Start offset.
  `typeId` - Type ID.

### Method Detail

#### 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 `PortableRawWriterEx`

#### array

    public byte[] array()

Returns:
  Array.

#### outputStream

    public PortableOutputStream outputStream()

Returns:
  Output stream.

#### reserve

    public int reserve(int bytes)

Parameters:
  `bytes` - Number of bytes to reserve.
Returns:
  Offset.

#### reserveAndMark

    public int reserveAndMark(int bytes)

Parameters:
  `bytes` - Number of bytes to reserve.
Returns:
  Offset.

#### writeDelta

    public void writeDelta(int off)

Parameters:
  `off` - Offset.

#### writeLength

    public void writeLength()

#### writeRawOffsetIfNeeded

    public void writeRawOffsetIfNeeded()

#### 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.

#### doWriteByte

    public void doWriteByte(byte val)

Parameters:
  `val` - Value.

#### doWriteShort

    public void doWriteShort(short val)

Parameters:
  `val` - Value.

#### doWriteInt

    public void doWriteInt(int val)

Parameters:
  `val` - Value.

#### doWriteLong

    public void doWriteLong(long val)

Parameters:
  `val` - Value.

#### doWriteFloat

    public void doWriteFloat(float val)

Parameters:
  `val` - Value.

#### doWriteDouble

    public void doWriteDouble(double val)

Parameters:
  `val` - Value.

#### doWriteChar

    public void doWriteChar(char val)

Parameters:
  `val` - Value.

#### doWriteBoolean

    public void doWriteBoolean(boolean val)

Parameters:
  `val` - Value.

#### 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.

#### doWriteObject

    public void doWriteObject(@Nullable
                     Object obj,
                     boolean detached)
                       throws PortableException

Parameters:
  `obj` - Object.
  `detached` - Detached or not.
Throws:
  `PortableException` - In case of error.

#### doWritePortableObject

    public void doWritePortableObject(@Nullable
                             PortableObjectImpl po)

Parameters:
  `po` - Portable object.

#### writeByte

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

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

#### writeByte

    public void writeByte(byte val)
                   throws PortableException

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

#### writeShort

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

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

#### writeShort

    public void writeShort(short val)
                    throws PortableException

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

#### writeInt

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

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

#### writeInt

    public void writeInt(int val)
                  throws PortableException

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

#### writeLong

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

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

#### writeLong

    public void writeLong(long val)
                   throws PortableException

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

#### writeFloat

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

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

#### writeFloat

    public void writeFloat(float val)
                    throws PortableException

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

#### writeDouble

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

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

#### writeDouble

    public void writeDouble(double val)
                     throws PortableException

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

#### writeChar

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

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

#### writeChar

    public void writeChar(char val)
                   throws PortableException

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

#### writeBoolean

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

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

#### writeBoolean

    public void writeBoolean(boolean val)
                      throws PortableException

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

#### writeDecimal

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

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

#### writeDecimal

    public void writeDecimal(@Nullable
                    BigDecimal val)
                      throws PortableException

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

#### writeString

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

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

#### writeString

    public void writeString(@Nullable
                   String val)
                     throws PortableException

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

#### writeUuid

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

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

#### writeUuid

    public void writeUuid(@Nullable
                 UUID val)
                   throws PortableException

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

#### writeDate

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

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

#### writeDate

    public void writeDate(@Nullable
                 Date val)
                   throws PortableException

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

#### writeTimestamp

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

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

#### writeTimestamp

    public void writeTimestamp(@Nullable
                      Timestamp val)
                        throws PortableException

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

#### writeObject

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

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

#### writeObject

    public void writeObject(@Nullable
                   Object obj)
                     throws PortableException

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

#### writeObjectDetached

    public void writeObjectDetached(@Nullable
                           Object obj)
                             throws PortableException

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

#### writeByteArray

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

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

#### writeByteArray

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

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

#### writeShortArray

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

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

#### writeShortArray

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

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

#### writeIntArray

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

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

#### writeIntArray

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

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

#### writeLongArray

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

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

#### writeLongArray

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

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

#### writeFloatArray

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

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

#### writeFloatArray

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

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

#### writeDoubleArray

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

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

#### writeDoubleArray

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

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

#### writeCharArray

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

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

#### writeCharArray

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

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

#### writeBooleanArray

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

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

#### writeBooleanArray

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

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

#### writeDecimalArray

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

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

#### writeDecimalArray

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

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

#### writeStringArray

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

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

#### writeStringArray

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

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

#### writeUuidArray

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

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

#### writeUuidArray

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

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

#### writeDateArray

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

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

#### writeDateArray

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

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

#### writeObjectArray

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

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

#### writeObjectArray

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

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

#### writeCollection

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

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

#### writeCollection

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

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

#### writeMap

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

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

#### writeMap

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

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

#### writeEnum

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

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

#### writeEnum

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

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

#### writeEnumArray

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

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

#### writeEnumArray

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

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

#### rawWriter

    public PortableRawWriter 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 portable objects are not supported.

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

#### out

    public PortableOutputStream out()

Specified by:
  `out` in interface `PortableRawWriterEx`
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 `PortableRawWriterEx`
Returns:
  Position in the stream where value is to be written.

#### writeInt

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

Write int value at the specific position.

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

#### newWriter

    public PortableWriterExImpl newWriter(int typeId)

Create new writer with same context.

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

#### context

    public PortableContext context()

Returns:
  Portable context.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.4.0
Release Date | : September 24 2015