Redian新闻
>
PhD student positions with full financial support available
avatar
PhD student positions with full financial support available# ChemEng - 化学工程
i*p
1
I use ObjectOutputStream to write an object to a file by Java 1.6. Though
the object in the file can be read by Java application,the Android App (also
compiled by Java 1.6 in Eclipse) cannot read the same object by
ObjectInputStream. The object does implement java.io.Serializable.
Does anyone know the reason?
Thanks!
avatar
a*3
2
Two Ph.D. student positions with full financial support are available
starting from Fall 2011 or Spring 2012 in Dr. Ying Wang’s group, in the
Department of Mechanical Engineering at Louisiana State University.
Current research interests of the group include: nanomaterials for energy
applications, lithium-ion rechargeable batteries, solar cells,
superhydrophobic coatings, photocatalytic materials, electrochromic displays
, atomic layer deposition (ALD), sol-gel processing, and electrochemical
synthesis.
Self-motivated individuals holding a Bachelor’s or Master’s degree in
Chemistry, Materials Science and Engineering, and related disciplines are
encouraged to apply.
More information can be found at
http://appl003.lsu.edu/mech/mechweb.nsf/$Content/Ying+Wang?Open
Students who are interested in the positions can contact Dr. Ying Wang by
email at y***[email protected]
avatar
m*r
3
what is the error?

also

【在 i**p 的大作中提到】
: I use ObjectOutputStream to write an object to a file by Java 1.6. Though
: the object in the file can be read by Java application,the Android App (also
: compiled by Java 1.6 in Eclipse) cannot read the same object by
: ObjectInputStream. The object does implement java.io.Serializable.
: Does anyone know the reason?
: Thanks!

avatar
i*p
4
e.getMessage() returns the class name "Header"
This is the code to in Android App to read the object.
try {
FileInputStream fin = new FileInputStream(file);
ObjectInputStream sin = new ObjectInputStream(fin);

Header header = (Header)sin.readObject();
} catch (Exception e) {
Log.e("Err", e.getMessage());
}
------------------------
Here is code in Java application to write the file
try {
FileOutputStream f = new FileOutputStream(file);
ObjectOutputStream s = new ObjectOutputStream(f);

Header header = new Header();
s.writeObject(header);

s.flush();
s.close();
f.close();
} catch (Exception e) {
System.err.println("Error: " + e.getMessage());
}
avatar
h*0
5
写和读的程序是一起编译的吗?
你试试自己指定uid

also

【在 i**p 的大作中提到】
: I use ObjectOutputStream to write an object to a file by Java 1.6. Though
: the object in the file can be read by Java application,the Android App (also
: compiled by Java 1.6 in Eclipse) cannot read the same object by
: ObjectInputStream. The object does implement java.io.Serializable.
: Does anyone know the reason?
: Thanks!

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。