如何在Android中的SQLite数据库中存储PDF文件

编程入门 行业动态 更新时间:2024-10-26 02:35:16
本文介绍了如何在Android中的SQLite数据库中存储PDF文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

实际上,我想在我们的Android手机中下载一个PDF文件,并且不想在他尝试通过将手机连接到PC打开时授予在PC中打开PDF文件的权限.所以我想将 PDF 文件存储在 SQLite 数据库解决方案中.

Actually, I want to download a PDF file in our Android phone and don't want to give the permission to open the PDF file in PC when he try to open by connecting the Phone to PC. so I want to go with storing the PDF file in SQLite Data Base solution.

我的问题是...是否可以在 SQLite 数据库中存储 PDF 文件?如果是,如何?或者有没有其他方法可以实现相同的功能?

My question is... Is it possible to store PDF file in SQLite database? If yes, how? Or is there any other way to implement same functionality?

请帮帮我...

谢谢...

推荐答案

可以.只需读取pdf文件的所有字节并存储在sqlite db的blob字段中.

You can. Simply read all the bytes of the pdf file and store in the blob field of sqlite db.

更多推荐

如何在Android中的SQLite数据库中存储PDF文件

本文发布于:2023-10-07 10:44:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1469176.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据库中   文件   如何在   SQLite   Android

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!