不断收到 ionotseriaized 异常,我做错了什么?
所以,我有一个类,它具有以下属性,
private String name;
private int counter;
private DateFormat df;
private DecimalFormat def;
private ArrayList<Bike> bike;
static String[] titles = {"some,items,here"};
所有这些属性都已经初始化,然后在顶部我声明 公共类 Motor 扩展了 AbstractTableModel 实现了可序列化
但当我使用 ObjectOutputStream 时,我仍然收到 IONotSerializedException ,是否存在一些我现在可能知道的限制,这就是为什么它是这样的?
So, i have a class which has the following attributes
private String name;
private int counter;
private DateFormat df;
private DecimalFormat def;
private ArrayList<Bike> bike;
static String[] titles = {"some,items,here"};
all these are already initialized and then on top i declaredpublic class Motor extends AbstractTableModel implements Serializable
but i still get a IONotSerializableException when i use an ObjectOutputStream, is there some restrictions which i might now know that's why its like this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所有这些字段都是可序列化的,
Bike
可能除外。这意味着:
异常消息和完整的堆栈跟踪应该可以提供问题真正根源的线索。
All of those fields is serializable, with the possible exception of
Bike
.So that means that:
The exception message and full stacktrace should give clues to the real source of the problem.