|Oracle® interMedia Java Classes Reference
10g Release 1 (10.1)
Part Number B10830-01
public int writeToSource(byte[ ] [ ] ctx, int startpos, int numbytes, byte[ ] buffer)
Writes data to the data source. This method writes the specified number of bytes from the application buffer to the data source starting at the specified position in the data source. Not all source plug-ins support write operations. For example, applications can write to a BLOB specified by the localData attribute; however, the "file" and "http" data source types do not support write access, and so do not support this method. Furthermore, those source plug-ins that do support write access may support only sequential write access, and may not support write access to arbitrary starting positions within the data source.
Not all source plug-ins require that the data source be opened before it can be written. However, to ensure that an application will work with any current or future source plug-ins, call the openSource( ) method before calling this method.
The source plug-in context information. See Oracle interMedia Reference for more information.
The start position in the data source.
The number of bytes to be written to the data source.
A byte array containing the data to be written.
This method returns the number of bytes written, as an integer.
This exception is thrown if an error occurs executing the corresponding writeToSource( ) method in the database.