public class PortableWriterExImpl extends Object implements PortableWriter, PortableRawWriterEx, ObjectOutput
| Constructor and Description |
|---|
PortableWriterExImpl(PortableContext ctx,
int off,
int typeId,
boolean metaEnabled) |
| Modifier and Type | Method and Description |
|---|---|
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<?>> |
writeEnum(String fieldName,
T val) |
<T extends Enum<?>> |
writeEnum(T val) |
<T extends Enum<?>> |
writeEnumArray(String fieldName,
T[] val) |
<T extends Enum<?>> |
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) |
public PortableWriterExImpl(PortableContext ctx, int off, int typeId, boolean metaEnabled)
ctx - Context.off - Start offset.typeId - Type ID.public void close()
close in interface ObjectOutputclose in interface AutoCloseableclose in interface PortableRawWriterExpublic byte[] array()
public PortableOutputStream outputStream()
public int reserve(int bytes)
bytes - Number of bytes to reserve.public int reserveAndMark(int bytes)
bytes - Number of bytes to reserve.public void writeDelta(int off)
off - Offset.public void writeLength()
public void writeRawOffsetIfNeeded()
public void write(byte[] val)
write in interface DataOutputwrite in interface ObjectOutputval - Byte array.public void write(byte[] val,
int off,
int len)
write in interface DataOutputwrite in interface ObjectOutputval - Byte array.off - Offset.len - Length.public void doWriteByte(byte val)
val - Value.public void doWriteShort(short val)
val - Value.public void doWriteInt(int val)
val - Value.public void doWriteLong(long val)
val - Value.public void doWriteFloat(float val)
val - Value.public void doWriteDouble(double val)
val - Value.public void doWriteChar(char val)
val - Value.public void doWriteBoolean(boolean val)
val - Value.public void doWriteDecimal(@Nullable BigDecimal val)
val - String value.public void doWriteObject(@Nullable Object obj, boolean detached) throws PortableException
obj - Object.detached - Detached or not.PortableException - In case of error.public void doWritePortableObject(@Nullable PortableObjectImpl po)
po - Portable object.public void writeByte(String fieldName, byte val) throws PortableException
writeByte in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeByte(byte val)
throws PortableException
writeByte in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeShort(String fieldName, short val) throws PortableException
writeShort in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeShort(short val)
throws PortableException
writeShort in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeInt(String fieldName, int val) throws PortableException
writeInt in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeInt(int val)
throws PortableException
writeInt in interface DataOutputwriteInt in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeLong(String fieldName, long val) throws PortableException
writeLong in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeLong(long val)
throws PortableException
writeLong in interface DataOutputwriteLong in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeFloat(String fieldName, float val) throws PortableException
writeFloat in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeFloat(float val)
throws PortableException
writeFloat in interface DataOutputwriteFloat in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeDouble(String fieldName, double val) throws PortableException
writeDouble in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeDouble(double val)
throws PortableException
writeDouble in interface DataOutputwriteDouble in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeChar(String fieldName, char val) throws PortableException
writeChar in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeChar(char val)
throws PortableException
writeChar in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeBoolean(String fieldName, boolean val) throws PortableException
writeBoolean in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeBoolean(boolean val)
throws PortableException
writeBoolean in interface DataOutputwriteBoolean in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeDecimal(String fieldName, @Nullable BigDecimal val) throws PortableException
writeDecimal in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeDecimal(@Nullable BigDecimal val) throws PortableException
writeDecimal in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeString(String fieldName, @Nullable String val) throws PortableException
writeString in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeString(@Nullable String val) throws PortableException
writeString in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeUuid(String fieldName, @Nullable UUID val) throws PortableException
writeUuid in interface PortableWriterfieldName - Field name.val - UUID to write.PortableException - In case of error.public void writeUuid(@Nullable UUID val) throws PortableException
writeUuid in interface PortableRawWriterval - UUID to write.PortableException - In case of error.public void writeDate(String fieldName, @Nullable Date val) throws PortableException
writeDate in interface PortableWriterfieldName - Field name.val - Date to write.PortableException - In case of error.public void writeDate(@Nullable Date val) throws PortableException
writeDate in interface PortableRawWriterval - Date to write.PortableException - In case of error.public void writeTimestamp(String fieldName, @Nullable Timestamp val) throws PortableException
writeTimestamp in interface PortableWriterfieldName - Field name.val - Timestamp to write.PortableException - In case of error.public void writeTimestamp(@Nullable Timestamp val) throws PortableException
writeTimestamp in interface PortableRawWriterval - Timestamp to write.PortableException - In case of error.public void writeObject(String fieldName, @Nullable Object obj) throws PortableException
writeObject in interface PortableWriterfieldName - Field name.obj - Value to write.PortableException - In case of error.public void writeObject(@Nullable Object obj) throws PortableException
writeObject in interface ObjectOutputwriteObject in interface PortableRawWriterobj - Value to write.PortableException - In case of error.public void writeObjectDetached(@Nullable Object obj) throws PortableException
writeObjectDetached in interface PortableRawWriterExobj - Object to write.PortableException - In case of error.public void writeByteArray(String fieldName, @Nullable byte[] val) throws PortableException
writeByteArray in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeByteArray(@Nullable byte[] val) throws PortableException
writeByteArray in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeShortArray(String fieldName, @Nullable short[] val) throws PortableException
writeShortArray in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeShortArray(@Nullable short[] val) throws PortableException
writeShortArray in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeIntArray(String fieldName, @Nullable int[] val) throws PortableException
writeIntArray in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeIntArray(@Nullable int[] val) throws PortableException
writeIntArray in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeLongArray(String fieldName, @Nullable long[] val) throws PortableException
writeLongArray in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeLongArray(@Nullable long[] val) throws PortableException
writeLongArray in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeFloatArray(String fieldName, @Nullable float[] val) throws PortableException
writeFloatArray in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeFloatArray(@Nullable float[] val) throws PortableException
writeFloatArray in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeDoubleArray(String fieldName, @Nullable double[] val) throws PortableException
writeDoubleArray in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeDoubleArray(@Nullable double[] val) throws PortableException
writeDoubleArray in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeCharArray(String fieldName, @Nullable char[] val) throws PortableException
writeCharArray in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeCharArray(@Nullable char[] val) throws PortableException
writeCharArray in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeBooleanArray(String fieldName, @Nullable boolean[] val) throws PortableException
writeBooleanArray in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeBooleanArray(@Nullable boolean[] val) throws PortableException
writeBooleanArray in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeDecimalArray(String fieldName, @Nullable BigDecimal[] val) throws PortableException
writeDecimalArray in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeDecimalArray(@Nullable BigDecimal[] val) throws PortableException
writeDecimalArray in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeStringArray(String fieldName, @Nullable String[] val) throws PortableException
writeStringArray in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeStringArray(@Nullable String[] val) throws PortableException
writeStringArray in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeUuidArray(String fieldName, @Nullable UUID[] val) throws PortableException
writeUuidArray in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeUuidArray(@Nullable UUID[] val) throws PortableException
writeUuidArray in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeDateArray(String fieldName, @Nullable Date[] val) throws PortableException
writeDateArray in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeDateArray(@Nullable Date[] val) throws PortableException
writeDateArray in interface PortableRawWriterval - Value to write.PortableException - In case of error.public void writeObjectArray(String fieldName, @Nullable Object[] val) throws PortableException
writeObjectArray in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public void writeObjectArray(@Nullable Object[] val) throws PortableException
writeObjectArray in interface PortableRawWriterval - Value to write.PortableException - In case of error.public <T> void writeCollection(String fieldName, @Nullable Collection<T> col) throws PortableException
writeCollection in interface PortableWriterfieldName - Field name.col - Collection to write.PortableException - In case of error.public <T> void writeCollection(@Nullable Collection<T> col) throws PortableException
writeCollection in interface PortableRawWritercol - Collection to write.PortableException - In case of error.public <K,V> void writeMap(String fieldName, @Nullable Map<K,V> map) throws PortableException
writeMap in interface PortableWriterfieldName - Field name.map - Map to write.PortableException - In case of error.public <K,V> void writeMap(@Nullable Map<K,V> map) throws PortableException
writeMap in interface PortableRawWritermap - Map to write.PortableException - In case of error.public <T extends Enum<?>> void writeEnum(String fieldName, T val) throws PortableException
writeEnum in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public <T extends Enum<?>> void writeEnum(T val) throws PortableException
writeEnum in interface PortableRawWriterval - Value to write.PortableException - In case of error.public <T extends Enum<?>> void writeEnumArray(String fieldName, T[] val) throws PortableException
writeEnumArray in interface PortableWriterfieldName - Field name.val - Value to write.PortableException - In case of error.public <T extends Enum<?>> void writeEnumArray(T[] val) throws PortableException
writeEnumArray in interface PortableRawWriterval - Value to write.PortableException - In case of error.public PortableRawWriter rawWriter()
rawWriter in interface PortableWriterpublic PortableOutputStream out()
out in interface PortableRawWriterExpublic void writeBytes(String s) throws IOException
writeBytes in interface DataOutputIOExceptionpublic void writeChars(String s) throws IOException
writeChars in interface DataOutputIOExceptionpublic void writeUTF(String s) throws IOException
writeUTF in interface DataOutputIOExceptionpublic void writeByte(int v)
throws IOException
writeByte in interface DataOutputIOExceptionpublic void writeShort(int v)
throws IOException
writeShort in interface DataOutputIOExceptionpublic void writeChar(int v)
throws IOException
writeChar in interface DataOutputIOExceptionpublic void write(int b)
throws IOException
write in interface DataOutputwrite in interface ObjectOutputIOExceptionpublic void flush()
throws IOException
flush in interface ObjectOutputIOExceptionpublic int reserveInt()
reserveInt in interface PortableRawWriterExpublic void writeInt(int pos,
int val)
throws PortableException
writeInt in interface PortableRawWriterExpos - Position.val - Value.PortableException - If failed.public PortableWriterExImpl newWriter(int typeId)
typeId - typepublic PortableContext context()
Follow @ApacheIgnite
Ignite Fabric : ver. 1.4.0 Release Date : September 24 2015