Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try
- {
- fis = new FileInputStream("filename.ser");
- ois = new ObjectInputStream(fis);
- Object obj = null;
- try
- {
- while(true)
- obj = ois.readObject();
- }
- catch(EOFException eof)
- {
- //end of file reached, do nothing
- }
- }
- finally
- {
- if (ois != null)
- ois.close();
- if (fis != null)
- fis.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement