从格式不同的数据库生成二进制文件 [英] generate binary files from database where format is different

查看:133
本文介绍了从格式不同的数据库生成二进制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我必须从数据库中生成二进制文件,方法是首先在类中获取数据,然后将这些类写入二进制文件

事实是输出文件的结构与类使用的结构不同,因此我必须按参数编写参数

我的问题是:这些类是否需要实现可序列化的接口?还是没有必要?

hello everyone

i have to generate a binary files from database, by getting data in first place in classes then write those classes into binary files

the thing is that the structure of output files is not the same that is used by the classes so i have to write parameter by parameter

my question is: do those classes need to implement the interface serializable ?? or it''s not necessary ??

推荐答案

只有当您要将整个类转储到数据库中时,才需要这样做.这样做的唯一原因是,如果以后要将其还原为同一类.
Only time you need to do that is if your going to dump the entire class into the database. The only reason to do that is if you''re going to restore it as the same class at a later time.


非常感谢您

这样我就可以编写二进制文件,而无需在类中实现可序列化的接口??
thank you verry much

so i can write the binary files without implementing the interface serializable in the classes ??


这篇关于从格式不同的数据库生成二进制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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