Java ObjectOutputStream Write saveSerialized(Serializable obj, File file)

Here you can find the source of saveSerialized(Serializable obj, File file)

Description

save Serialized

License

Open Source License

Declaration

static public void saveSerialized(Serializable obj, File file) throws IOException 

Method Source Code


//package com.java2s;
import java.io.*;

public class Main {
    static public void saveSerialized(Serializable obj, File file) throws IOException {
        ObjectOutputStream out = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(file)));
        out.writeObject(obj);/*from ww  w .  j a  v  a  2  s.com*/
        out.close();
    }
}

Related

  1. saveObjectToPath(T objectToSave, String pathToSaveTo)
  2. saveParameters()
  3. saveResultToStream(ObjectOutputStream oos, Object result)
  4. saveResultToStream(ObjectOutputStream oos, Object result)
  5. saveSerializableObject(Object obj, String path)
  6. saveStringToFile(String filepath, String content)
  7. saveToFile(File f, Object obj)
  8. saveToFile(final File file, final Object obj)
  9. saveToFile(Serializable object, File file, boolean compress)