Package de.bytefish.pgbulkinsert.pgsql
Class PgBinaryWriter
- java.lang.Object
-
- de.bytefish.pgbulkinsert.pgsql.PgBinaryWriter
-
- All Implemented Interfaces:
AutoCloseable
public class PgBinaryWriter extends Object implements AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description PgBinaryWriter(OutputStream out)PgBinaryWriter(OutputStream out, int bufferSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidstartRow(int numColumns)<TTargetType>
voidwrite(IValueHandler<TTargetType> handler, @Nullable TTargetType value)voidwriteBoolean(boolean value)Writes primitive boolean to the output streamvoidwriteByte(int value)Writes primitive byte to the output streamvoidwriteDouble(double value)Writes primitive double to the output streamvoidwriteFloat(float value)Writes primitive float to the output streamvoidwriteInt(int value)Writes primitive integer to the output streamvoidwriteLong(long value)Writes primitive long to the output streamvoidwriteNull()Writes a Null Value.voidwriteShort(int value)Writes primitive short to the output stream
-
-
-
Constructor Detail
-
PgBinaryWriter
public PgBinaryWriter(OutputStream out)
-
PgBinaryWriter
public PgBinaryWriter(OutputStream out, int bufferSize)
-
-
Method Detail
-
startRow
public void startRow(int numColumns)
-
write
public <TTargetType> void write(IValueHandler<TTargetType> handler, @Nullable TTargetType value)
-
writeBoolean
public void writeBoolean(boolean value)
Writes primitive boolean to the output stream- Parameters:
value- value to write
-
writeByte
public void writeByte(int value)
Writes primitive byte to the output stream- Parameters:
value- value to write
-
writeShort
public void writeShort(int value)
Writes primitive short to the output stream- Parameters:
value- value to write
-
writeInt
public void writeInt(int value)
Writes primitive integer to the output stream- Parameters:
value- value to write
-
writeLong
public void writeLong(long value)
Writes primitive long to the output stream- Parameters:
value- value to write
-
writeFloat
public void writeFloat(float value)
Writes primitive float to the output stream- Parameters:
value- value to write
-
writeDouble
public void writeDouble(double value)
Writes primitive double to the output stream- Parameters:
value- value to write
-
writeNull
public void writeNull()
Writes a Null Value.
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable
-
-