// Path: app/src/main/java/com/pushapp/press/model/WrappedIOException.java
// public class WrappedIOException {
//     public static IOException wrap(final Throwable e) {
//         return wrap(e.getMessage(), e);
//     }
// 
//     public static IOException wrap(final String message, final Throwable e) {
//         final IOException wrappedException = new IOException(message + " [" +
//                 e.getMessage() + "]");
//         wrappedException.setStackTrace(e.getStackTrace());
//         wrappedException.initCause(e);
//         return wrappedException;
//     }
// }


import com.pushapp.press.model.WrappedIOException;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
package com.pushapp.press.util;




/**
 * @author Bryan Lamtoo.
 */
public class ObjectSerializer {

    public static String serialize(Serializable obj) throws IOException {
        if (obj == null) return "";
        try {
            ByteArrayOutputStream serialObj = new ByteArrayOutputStream();
// Path: app/src/main/java/com/pushapp/press/model/WrappedIOException.java
// public class WrappedIOException {
//     public static IOException wrap(final Throwable e) {
//         return wrap(e.getMessage(), e);
//     }
// 
//     public static IOException wrap(final String message, final Throwable e) {
//         final IOException wrappedException = new IOException(message + " [" +
//                 e.getMessage() + "]");
//         wrappedException.setStackTrace(e.getStackTrace());
//         wrappedException.initCause(e);
//         return wrappedException;
//     }
// }


// Path: app/src/main/java/com/pushapp/press/util/ObjectSerializer.java
import com.pushapp.press.model.WrappedIOException;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;

package com.pushapp.press.util;




/**
 * @author Bryan Lamtoo.
 */
public class ObjectSerializer {

    public static String serialize(Serializable obj) throws IOException {
        if (obj == null) return "";
        try {
            ByteArrayOutputStream serialObj = new ByteArrayOutputStream();
            ObjectOutputStream objStream = new ObjectOutputStream(serialObj);