Write data to a smart large object
- Write the data from a byte[ ] buffer to the object.
- Write the data from a file input stream to the object.
- Write the data from a file to the object.
public int IfxLoWrite(int lofd, byte[] buffer) throws SQLException public int IfxLoWrite(int lofd, InputStream fin, int length) throws SQLException
The first version of the method writes buffer.length bytes of data from the buffer into the smart large object. The second version writes length bytes of data from an InputStream object into the smart large object.
The lofd parameter is a locator file descriptor returned by the IfxLoCreate() or IfxLoOpen() method. The buffer parameter is the byte[] buffer where the data is read. The fin parameter is the InputStream object from which data is written into the smart large object. The length parameter is the number of bytes written into the smart large object. The driver returns the number of bytes written.
public int IfxLoFromFile (int lofd, String filename, int flag, int offset, int amount) throws SQLException
The lofd parameter
is a locator file descriptor returned by the IfxLoCreate() or IfxLoOpen() method.
The flag parameter indicates whether the file is on the client
or the server. The value is either IfxSmartBlob.LO_CLIENT_FILE
or IfxSmartBlob.LO_SERVER_FILE
.
The driver returns the number of bytes written.