Eclipse是否具有用于java序列化文件的编辑器/查看器? [英] Does Eclipse have an editor/viewer for java serialized files?
问题描述
我使用 ObjectOutputStream(FileOutputStream(File))
序列化对象,并使用类似的 InputStreams
反序列化它们。有没有办法查看这些序列化文件(在eclipse中最好),所以我可以检查,如果所有必要的属性都是写的?
I'm serializing my objects with ObjectOutputStream(FileOutputStream(File))
and deserializing them with the analogous InputStreams
. Is there a way to look inside of these serialized files (in eclipse preferably), so I can check, if all necessary attributes were written?
编辑:谷歌搜索是否定的
edit: google search was negative
推荐答案
编写一些测试(使用Eclipse的内置JUnit支持)。
Write some tests (using Eclipse's built-in JUnit support).
这些文件的唯一方法是使用 ObjectInputStream(FileInputStream(File))
,除非你是一个字节码大师,并使用十六进制编辑器。如果你真的有一些测试,那就没有必要看里面了。
The only way to "look inside" these files is to use ObjectInputStream(FileInputStream(File))
, unless you're a bytecode guru and use a hex editor. If you actually have some testing, there is no need to "look inside" anything.
这篇关于Eclipse是否具有用于java序列化文件的编辑器/查看器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!