package com.dianping.hessianblacklist;

import com.caucho.hessian.io.*;
import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;

import java.io.ByteArrayInputStream;
import java.io.IOException;

/**
 * @author code4crafer@gmail.com
 */
public abstract class AbstractTest {

    protected <T> T goThroughHessian(T origin) throws IOException {
        ByteOutputStream byteOutputStream = new ByteOutputStream();
        Hessian2Output hessian2Output = new Hessian2Output(byteOutputStream);
        hessian2Output.writeObject(origin);
        hessian2Output.close();
        byte[] bytes = byteOutputStream.getBytes();
        Hessian2Input hessian2Input = new Hessian2Input(new ByteArrayInputStream(bytes));
        Object object = hessian2Input.readObject();
        return (T) object;
    }

}

@@ -66,66 +66,95 @@
 .io.
-*;%0Aimport com.sun.xml.internal.messaging.saaj.util.ByteOut
+Hessian2Input;%0Aimport com.caucho.hessian.io.Hessian2Output;%0A%0Aimport java.io.ByteArrayIn
 putS
@@ -160,17 +160,16 @@
 Stream;%0A
-%0A
 import j
@@ -176,34 +176,35 @@
 ava.io.ByteArray
-In
+Out
 putStream;%0Aimpor
@@ -382,24 +382,29 @@
         Byte
+Array
 OutputStream
@@ -431,16 +431,21 @@
 new Byte
+Array
 OutputSt
@@ -650,16 +650,19 @@
 eam.
-ge
 t
+o
 Byte
-s
+Array
 ();%0A

fix import