java - XMLDecoder.readObject() returns null -


I am trying to read objects from XML files using XMLDecoder. The construction is fine, but when I call the readObject () method, then I get nervous instead of what I expected.

The file exists and reads the created BufferedInputStream file correctly. This code works fine on the original Vista laptop which was written on it, but my Win XP machine fails.

  try {XMLDecoder decoder = new XMLDecoder (New BufferedInputStream (New FileInputStream ("Params.xml"))); Ultimate = (parameter) decoder .readObject (); Decoder.close (); } Hold (FileNotFoundException e) {System.out.println (e.toString ()); }  

Is Java being used on Vista and XP box? Also check the version of Java used to create XML originally.

The object must be encoded on another test XP box and read it after trying again.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -