H2,HSQLDB或任何其他使用InputStream的嵌入式数据库 [英] H2, HSQLDB or any other embedded database using an InputStream

查看:73
本文介绍了H2,HSQLDB或任何其他使用InputStream的嵌入式数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以将H2,HSQLDB或任何其他嵌入式数据库与InputStream中的数据库而不是文件一起使用吗?

Can I use H2, HSQLDB, or any other embedded database, with a database from an InputStream instead of a file?

我打算使用 AssetManager.open() 在Android上,它可以在随机访问模式下返回InputStream.

推荐答案

H2支持可插拔文件系统允许您访问zip或jar文件中的只读数据库 .但是,当前AssetManager没有文件系统实现.实施起来应该相对容易.最好的起点可能是 FileSystemZip

H2 supports a pluggable file system that allows you to access read-only databases in a zip or jar files. However, there is currently no file system implementation for the AssetManager. It should be relatively easy to implement it. The best starting point is probably FileSystemZip and FileObjectZip.

这篇关于H2,HSQLDB或任何其他使用InputStream的嵌入式数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆