Java Serialize serializeMock(Object mock)

Here you can find the source of serializeMock(Object mock)

Description

serialize Mock

License

Open Source License

Declaration

public static ByteArrayOutputStream serializeMock(Object mock) throws IOException 

Method Source Code


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

import java.io.*;

public class Main {
    public static ByteArrayOutputStream serializeMock(Object mock) throws IOException {
        ByteArrayOutputStream serialized = new ByteArrayOutputStream();
        new ObjectOutputStream(serialized).writeObject(mock);
        return serialized;
    }/* w w  w.  ja v a  2 s  .  co  m*/
}

Related

  1. serializeInt(int i)
  2. serializeInt2MinLE(int value)
  3. serializeInt2MinLE(int value)
  4. serializeIntLE(int value, byte[] outbuf, int offset)
  5. serializeJdk(Object obj)
  6. serializeObject(B b)
  7. serializeObject(final Object object)
  8. serializeObject(String absFilePath, Object obj)
  9. serializeObject(String path, Object e)