Java Object Serialize serialize(Object object, String path)

Here you can find the source of serialize(Object object, String path)

Description

serialize

License

Apache License

Declaration

public static void serialize(Object object, String path) throws IOException 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.*;

public class Main {
    public static void serialize(Object object, String path) throws IOException {
        FileOutputStream fout = new FileOutputStream(path);
        ObjectOutputStream out = new ObjectOutputStream(fout);
        out.writeObject(object);//ww w. ja v  a 2 s.  c  o m
        out.close();
        fout.close();
    }
}

Related

  1. serialize(Object object)
  2. serialize(Object object, boolean zipped)
  3. serialize(Object object, File file)
  4. serialize(Object object, File file)
  5. serialize(Object object, String fileName)
  6. Serialize(Object serializableObject, String filePath)
  7. serialize(Object state)
  8. serialize(Object value)
  9. serialize(Object value)