本文整理了Java中java.io.ObjectOutputStream.writeOrdinaryObject()
方法的一些代码示例,展示了ObjectOutputStream.writeOrdinaryObject()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectOutputStream.writeOrdinaryObject()
方法的具体详情如下:
包路径:java.io.ObjectOutputStream
类名称:ObjectOutputStream
方法名:writeOrdinaryObject
[英]Writes representation of a "ordinary" (i.e., not a String, Class, ObjectStreamClass, array, or enum constant) serializable object to the stream.
[中]将“普通”(即不是字符串、类、ObjectStreamClass、数组或枚举常量)可序列化对象的表示形式写入流。
代码示例来源:origin: stackoverflow.com
Exception in thread "main" java.io.NotSerializableException: HouseSurvey
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at HouseSurvey.doPost(HouseSurvey.java:36)
at HouseSurvey.main(HouseSurvey.java:9)
代码示例来源:origin: org.apidesign.bck2brwsr/emul
writeEnum((Enum) obj, desc, unshared);
} else if (obj instanceof Serializable) {
writeOrdinaryObject(obj, desc, unshared);
} else {
if (extendedDebugInfo) {
代码示例来源:origin: jtulach/bck2brwsr
writeEnum((Enum) obj, desc, unshared);
} else if (obj instanceof Serializable) {
writeOrdinaryObject(obj, desc, unshared);
} else {
if (extendedDebugInfo) {
内容来源于网络,如有侵权,请联系作者删除!