ObjectInputStrem.readObject gets stuck
843810Sep 8 2004 — edited Sep 16 2004Hi,
i'm facing a bad problem with my serialization. I have a serialized file that came with an open source project. When i access this file with classes from the package, it works fine, but when i import these classes into my workspace - i'm using eclipse 3.0 - every gets stuck at the readObject() call.
final InputStream in=Unit.class.getClassLoader().getResourceAsStream(UnitSet.PATHNAME);
if (in!=null) try {
final ObjectInputStream oin=new ObjectInputStream(in);
final Unit[] units=(Unit[]) oin.readObject();
oin.close();
/*
* Appelle 'intern()' simplement par pr�caution.
* En principe, ce n'est pas n�cessaire.
*/
for (int i=0; i<units.length; i++) {
units=units[i].intern();
}
return units;
} catch (Exception exception) {
exception.printStackTrace();
}
return null;
}
Has anyone any idea why this happens? Any help would be great!