import com.ycsoft.commons.exception.ReportException;

public class SerializeUtil {
	
	public static byte[] serialize(Serializable object) throws ReportException {
		ObjectOutputStream oos = null;
		ByteArrayOutputStream baos = null;
		try {
			// 序列化
			baos = new ByteArrayOutputStream();
			oos = new ObjectOutputStream(baos);
			oos.writeObject(object);
			byte[] bytes = baos.toByteArray();
			return bytes;
