Java OutputStream Write serialize(Serializable s, OutputStream os)

Here you can find the source of serialize(Serializable s, OutputStream os)

Description

serialize

License

Open Source License

Declaration

public static void serialize(Serializable s, OutputStream os) throws IOException 

Method Source Code

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

import java.io.IOException;

import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.io.Serializable;

public class Main {
    public static void serialize(Serializable s, OutputStream os) throws IOException {
        ObjectOutputStream out = new ObjectOutputStream(os);
        out.writeObject(s);/* w  w  w .j a v  a  2 s .c om*/
        out.close();
    }
}

Related

  1. serialize(OutputStream os, String... params)
  2. serialize(OutputStream out, Object obj)
  3. serialize(Serializable obj, ByteArrayOutputStream bout)
  4. serialize(Serializable obj, OutputStream outputStream)
  5. serialize(Serializable obj, OutputStream outputStream)
  6. serializeInt(int i, DataOutputStream dout)
  7. serializeInt(OutputStream out, Integer data)
  8. serializeNull(DataOutputStream dout)
  9. serializeObject(OutputStream out, Object o)