Java ObjectOutputStream Write saveBinary(File dumpFile, Object object)

Here you can find the source of saveBinary(File dumpFile, Object object)

Description

save Binary

License

Open Source License

Declaration

public static void saveBinary(File dumpFile, Object object) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.*;

public class Main {
    public static void saveBinary(File dumpFile, Object object) {
        try {/*  w w w. ja v  a2 s  . c  o m*/
            ObjectOutputStream objStream = new ObjectOutputStream(new FileOutputStream(dumpFile));
            objStream.writeObject(object);
            objStream.close();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}

Related

  1. save(Object o)
  2. save(Object obj, String path)
  3. save(Serializable serialized, String filepath)
  4. save(String name, Serializable object)
  5. saveAllPlaying(Object obj, String path)
  6. saveCompressed(String filename, Object o)
  7. saveData(HashMap data, String filename)
  8. saveData(Object data, String filename)
  9. saveDate(String path, Object obj)