HSQLDB and in-memory files

Posted by lewap on Stack Overflow See other posts from Stack Overflow or by lewap
Published on 2010-06-08T23:32:40Z Indexed on 2010/06/08 23:42 UTC
Read the original article Hit count: 247

Filed under:
|
|

Is it possible to setup HSQLDB in a way, so that the files with the db information are written into memory instead of using actual files? I want to use hsqldb to export some data structures together with hibernate mappings. Is is, however, not possible to write temporary files, so that I need to generate the files in-memory and return a stream with their contents as a response.

Setting hsqldb to use nio seems not to be a solution, because there is no way to get hold of those files before they get written onto the filesystem.

What I'm thinking of is a protocol handler for hsqldb, but I didn't find a suitable solution yet.

Just to describe in other words: A hack solution would be to pass hsqldb a stream or several streams. It would then during its operation write data into those streams. After all data is written, the user of the db could then use those streams to send it back over the network.

© Stack Overflow or respective owner

Related posts about persistence

Related posts about export