Package org.h2gis.functions.io.utility
Class WriteBufferManager
java.lang.Object
org.h2gis.functions.io.utility.WriteBufferManager
Class to write files using nio.
- Author:
- Fernando Gonzalez Cortes
-
Constructor Summary
ConstructorsConstructorDescriptionWriteBufferManager(FileChannel channel) Creates a new WriteBufferManager that writes to the specified file channel -
Method Summary
Modifier and TypeMethodDescriptionvoidflush()flushes the cached contents into the channel.voidSpecifies the byte order.voidput(byte b) Puts the specified byte at the current positionvoidput(byte[] bs) Puts the specified bytes at the current positionvoidputDouble(double d) Puts the specified double at the current positionvoidputInt(int value) Puts the specified int at the current position
-
Constructor Details
-
WriteBufferManager
Creates a new WriteBufferManager that writes to the specified file channel- Parameters:
channel-- Throws:
IOException
-
-
Method Details
-
put
Puts the specified byte at the current position- Parameters:
b-- Throws:
IOException
-
put
Puts the specified bytes at the current position- Parameters:
bs-- Throws:
IOException
-
flush
flushes the cached contents into the channel. It is mandatory to call this method to finish the writing of the channel- Throws:
IOException
-
order
Specifies the byte order. One of the constants inByteBuffer- Parameters:
order-
-
putInt
Puts the specified int at the current position- Parameters:
value-- Throws:
IOException
-
putDouble
Puts the specified double at the current position- Parameters:
d-- Throws:
IOException
-