【发布时间】:2015-04-21 10:11:52
【问题描述】:
将 inputStream 转换为 ObjectInputStream 时出现此错误。 请帮我解决这个问题。
我的代码:
InputStream isSchema = Thread.currentThread()
.getContextClassLoader().getResourceAsStream("schema.xsd");
ObjectInputStream inputStream = new ObjectInputStream(isSchema);
例外:
java.io.StreamCorruptedException: invalid stream header: 3C787364
【问题讨论】:
-
这个问题你解决了吗?如果你解决了,你是怎么做的?
-
根据我的要求,我使用 InputStream 对象。我的情况不需要 ObjectInputStream 对象。感谢您的回复。
-
请添加答案以关闭此主题:)
标签: xsd xml-parsing java-7 xsd-validation xsd2code