Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void serializeAddress(ArrayList<Objeeect> objArr) {
- FileOutputStream fout = null;
- ObjectOutputStream oos = null;
- try {
- fout = new FileOutputStream("file.ser");
- oos = new ObjectOutputStream(fout);
- oos.writeObject(objArr);
- System.out.println("Done");
- } catch (Exception ex) {
- ex.printStackTrace();
- } finally {
- if (fout != null) {
- try {
- fout.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- if (oos != null) {
- try {
- oos.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement