dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] elvis9xu163 closed pull request #2225: Issuefix 2218
Date Mon, 13 Aug 2018 03:28:42 GMT
elvis9xu163 closed pull request #2225: Issuefix 2218
URL: https://github.com/apache/incubator-dubbo/pull/2225
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/CHANGES.md b/CHANGES.md
index 7c04d5b87e..78b92f758a 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,15 +1,61 @@
 # Release Notes
 
+## 2.6.3
+Enhancements / Features
+
+- Support implicit delivery of attachments from provider to consumer, #889
+- Support inject Spring bean to SPI by bean type, #1837
+- Add generic invoke and attachments support for http&hessian protocol, #1827
+- Get the real methodname to support consistenthash for generic invoke, #1872
+- Remove validation key from provider url on Consumer side, config depedently, #1386
+- Introducing the Bootstrap module as a unified entry for Dubbo startup and resource destruction, #1820
+- Open TCP_NODELAY on Netty 3, #1746
+- Support specify proxy type on provider side, #1873
+- Support dbindex in redis, #1831
+- Upgrade tomcat to 8.5.31, #1781
+
+Bugfixes
+
+- ExecutionDispatcher meet with user docs, #1089
+- Remove side effects of Dubbo custom loggers on Netty logger, #1717
+- Fix isShutdown() judge of Dubbo biz threadpool always return true, #1426
+- Selection of invoker node under the critical condition of only two nodes, #1759
+- Listener cann't be removed during unsubscribe when use ZK as registry, #1792
+- URL parsing problem when user filed contains '@',  #1808
+- Check null in CacheFilter to avoid NPE, #1828
+- Fix potential deadlock in DubboProtocol, #1836
+- Restore the bug that attachment has not been updated in the RpcContext when the Dubbo built-in retry mechanism is triggered, #1453
+- Some other small bugfixes
+
+Performance Tuning
+
+- ChannelState branch prediction optimization. #1643
+- Optimize AtomicPositiveInteger, less memory and compute cost, #348
+- Introduce embedded Threadlocal to replace the JDK implementation, #1745
+
+Hessian-lite
+
+- Hessian deserialization optimization, #1705
+- Support Locale type, #1761
+
+Compatibilities  
+This release is compatible with other versions since 2.5.3, and you can upgrade smoothly.
+- The RPC protocol version has been upgraded from 2.0.1 to 2.0.2, to support attachments delivery in #889, 
+generally, the protocol version is used internally, so it should have no side effects on users.
+
+Issues and Pull Requests, check [milestone-2.6.3](https://github.com/apache/incubator-dubbo/milestone/17).
+
+
 ## 2.6.2
 
 1. Hessian-lite serialization: revert locale serialization for compatibility, #1413
-2. Asset transfer to ASF, includeing pom, license, DISCLAIMER and so on, #1491
+2. Asset transfer to ASF, including pom, license, DISCLAIMER and so on, #1491
 3. Introduce of new dispatcher policy: EagerThreadpool, #1568
 4. Separate monitor data with group and version, #1407
 5. Spring Boot Enhancenment, #1611
-6. Gaceful shutdown enhancement
+6. Graceful shutdown enhancement
    - Remove exporter destroy logic in AnnotationBean.
    - Waiting for registry notification on consumer side by checking channel state.
 7. Simplify consumer/provider side check in RpcContext, #1444.
 
-Issues and Pull Requests, check [milestone-2.6.2](https://github.com/apache/incubator-dubbo/milestone/15).
\ No newline at end of file
+Issues and Pull Requests, check [milestone-2.6.2](https://github.com/apache/incubator-dubbo/milestone/15).
diff --git a/all/pom.xml b/all/pom.xml
index 0a90faac85..68e28d8819 100644
--- a/all/pom.xml
+++ b/all/pom.xml
@@ -19,16 +19,17 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-parent</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <artifactId>dubbo</artifactId>
-    <version>2.6.3-SNAPSHOT</version>
+    <version>2.6.4-SNAPSHOT</version>
     <packaging>jar</packaging>
     <name>dubbo-all</name>
     <description>The all in one project of dubbo</description>
     <properties>
         <skip_maven_deploy>false</skip_maven_deploy>
+        <hessian_lite_version>3.2.4</hessian_lite_version>
     </properties>
     <dependencies>
         <dependency>
@@ -328,7 +329,7 @@
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>hessian-lite</artifactId>
-            <version>3.2.3</version>
+            <version>${hessian_lite_version}</version>
             <scope>compile</scope>
             <optional>true</optional>
         </dependency>
diff --git a/bom/pom.xml b/bom/pom.xml
index 4b2a39aa42..1faf2cb8f6 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -2,6 +2,9 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
+    <properties>
+        <hessian_lite_version>3.2.4</hessian_lite_version>
+    </properties>
 
     <parent>
         <groupId>org.sonatype.oss</groupId>
@@ -11,7 +14,7 @@
 
     <groupId>com.alibaba</groupId>
     <artifactId>dubbo-bom</artifactId>
-    <version>2.6.3-SNAPSHOT</version>
+    <version>2.6.4-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>dubbo-bom</name>
@@ -281,7 +284,7 @@
             <dependency>
                 <groupId>com.alibaba</groupId>
                 <artifactId>hessian-lite</artifactId>
-                <version>3.2.3</version>
+                <version>${hessian_lite_version}</version>
             </dependency>
         </dependencies>
     </dependencyManagement>
diff --git a/dependencies-bom/pom.xml b/dependencies-bom/pom.xml
index c8526d5abf..3fcd2ef280 100644
--- a/dependencies-bom/pom.xml
+++ b/dependencies-bom/pom.xml
@@ -10,7 +10,7 @@
 
     <groupId>com.alibaba</groupId>
     <artifactId>dubbo-dependencies-bom</artifactId>
-    <version>2.6.3-SNAPSHOT</version>
+    <version>2.6.4-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>dubbo-dependencies-bom</name>
@@ -111,6 +111,7 @@
 
         <jaxb_version>2.2.7</jaxb_version>
         <activation_version>1.2.0</activation_version>
+        <hessian_lite_version>3.2.4</hessian_lite_version>
     </properties>
 
     <dependencyManagement>
@@ -352,7 +353,11 @@
                 <artifactId>javax.activation</artifactId>
                 <version>${activation_version}</version>
             </dependency>
-
+            <dependency>
+                <groupId>com.alibaba</groupId>
+                <artifactId>hessian-lite</artifactId>
+                <version>${hessian_lite_version}</version>
+            </dependency>
             <!-- Test lib -->
             <dependency>
                 <groupId>org.apache.curator</groupId>
diff --git a/distribution/pom.xml b/distribution/pom.xml
index b8590e7df8..29c6dd7235 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-parent</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-distribution</artifactId>
     <packaging>pom</packaging>
@@ -243,7 +243,7 @@
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>hessian-lite</artifactId>
-            <version>3.2.3</version>
+            <version>3.2.4</version>
         </dependency>
     </dependencies>
 
diff --git a/distribution/src/assembly/source-release.xml b/distribution/src/assembly/source-release.xml
index bd85f58b11..bbbec61516 100644
--- a/distribution/src/assembly/source-release.xml
+++ b/distribution/src/assembly/source-release.xml
@@ -46,6 +46,9 @@
                 <exclude>**/*.log</exclude>
                 <exclude>release.properties</exclude>
                 <exclude>**/*.xml.*</exclude>
+                <exclude>**/.mvn/**</exclude>
+                <exclude>**/*.jar</exclude>
+                <exclude>**/mvnw*</exclude>
             </excludes>
         </fileSet>
     </fileSets>
diff --git a/dubbo-bootstrap/pom.xml b/dubbo-bootstrap/pom.xml
index e4320f0ffc..5db7c77c27 100644
--- a/dubbo-bootstrap/pom.xml
+++ b/dubbo-bootstrap/pom.xml
@@ -14,13 +14,11 @@
   See the License for the specific language governing permissions and
   limitations under the License.
   -->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <artifactId>dubbo-parent</artifactId>
         <groupId>com.alibaba</groupId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
diff --git a/dubbo-cluster/pom.xml b/dubbo-cluster/pom.xml
index 4891dc3b73..21e917f5cb 100644
--- a/dubbo-cluster/pom.xml
+++ b/dubbo-cluster/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-parent</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-cluster</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-common/pom.xml b/dubbo-common/pom.xml
index a14dc321c8..240bf96738 100644
--- a/dubbo-common/pom.xml
+++ b/dubbo-common/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-parent</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-common</artifactId>
     <packaging>jar</packaging>
@@ -50,7 +50,7 @@
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>hessian-lite</artifactId>
-            <version>3.2.3</version>
+            <version>3.2.4</version>
         </dependency>
         <dependency>
             <groupId>com.alibaba</groupId>
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/Version.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/Version.java
index b84aaa5bfb..a0968357e4 100644
--- a/dubbo-common/src/main/java/com/alibaba/dubbo/common/Version.java
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/Version.java
@@ -34,7 +34,7 @@
 public final class Version {
     private static final Logger logger = LoggerFactory.getLogger(Version.class);
 
-    // Dubbo RPC protocol version
+    // Dubbo RPC protocol version, for compatibility, it must not be between 2.0.10 ~ 2.6.2
     public static final String DEFAULT_DUBBO_PROTOCOL_VERSION = "2.0.2";
     // Dubbo implementation version, usually is jar version.
     private static final String VERSION = getVersion(Version.class, "");
@@ -43,7 +43,7 @@
      * For protocol compatibility purpose.
      * Because {@link #isSupportResponseAttatchment} is checked for every call, int compare expect to has higher performance than string.
      */
-    private static final int LOWEST_VERSION_FOR_RESPONSE_ATTATCHMENT = 202; // 2.0.2
+    private static final int LOWEST_VERSION_FOR_RESPONSE_ATTATCHMENT = 20002; // 2.0.2
     private static final Map<String, Integer> VERSION2INT = new HashMap<String, Integer>();
 
     static {
@@ -66,7 +66,13 @@ public static boolean isSupportResponseAttatchment(String version) {
         if (version == null || version.length() == 0) {
             return false;
         }
-        return getIntVersion(version) >= LOWEST_VERSION_FOR_RESPONSE_ATTATCHMENT;
+        // for previous dubbo version(2.0.10/020010~2.6.2/020602), this version is the jar's version, so they need to be ignore
+        int iVersion = getIntVersion(version);
+        if (iVersion >= 20010 && iVersion <= 20602) {
+            return false;
+        }
+
+        return iVersion >= LOWEST_VERSION_FOR_RESPONSE_ATTATCHMENT;
     }
 
     public static int getIntVersion(String version) {
@@ -82,12 +88,31 @@ private static int parseInt(String version) {
         int v = 0;
         String[] vArr = version.split("\\.");
         int len = vArr.length;
-        for (int i = 1; i <= len; i++) {
-            v += Integer.parseInt(vArr[len - i]) * Math.pow(10, i - 1);
+        for (int i = 0; i < len; i++) {
+            v += Integer.parseInt(getDigital(vArr[i])) * Math.pow(10, (len - i - 1) * 2);
         }
         return v;
     }
 
+    private static String getDigital(String v) {
+        int index = 0;
+        for (int i = 0; i < v.length(); i++) {
+            char c = v.charAt(i);
+            if (Character.isDigit(c)) {
+                if (i == v.length() - 1) {
+                    index = i + 1;
+                } else {
+                    index = i;
+                }
+                continue;
+            } else {
+                index = i;
+                break;
+            }
+        }
+        return v.substring(0, index);
+    }
+
     private static boolean hasResource(String path) {
         try {
             return Version.class.getClassLoader().getResource(path) != null;
@@ -177,4 +202,4 @@ public static void checkDuplicate(String path, boolean failOnError) {
         }
     }
 
-}
\ No newline at end of file
+}
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java
index 59edd484e2..44ca3bc081 100644
--- a/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java
@@ -190,7 +190,7 @@ private static InetAddress getLocalAddress0() {
                 return localAddress;
             }
         } catch (Throwable e) {
-            logger.warn("Failed to retrieving ip address, " + e.getMessage(), e);
+            logger.warn(e);
         }
         try {
             Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces();
@@ -207,19 +207,18 @@ private static InetAddress getLocalAddress0() {
                                         return address;
                                     }
                                 } catch (Throwable e) {
-                                    logger.warn("Failed to retrieving ip address, " + e.getMessage(), e);
+                                    logger.warn(e);
                                 }
                             }
                         }
                     } catch (Throwable e) {
-                        logger.warn("Failed to retrieving ip address, " + e.getMessage(), e);
+                        logger.warn(e);
                     }
                 }
             }
         } catch (Throwable e) {
-            logger.warn("Failed to retrieving ip address, " + e.getMessage(), e);
+            logger.warn(e);
         }
-        logger.error("Could not get local host ip address, will use 127.0.0.1 instead.");
         return localAddress;
     }
 
diff --git a/dubbo-config/dubbo-config-api/pom.xml b/dubbo-config/dubbo-config-api/pom.xml
index dd0b9ed51d..85979f35e5 100644
--- a/dubbo-config/dubbo-config-api/pom.xml
+++ b/dubbo-config/dubbo-config-api/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-config</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-config-api</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ConsumerConfig.java b/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ConsumerConfig.java
index fcf96deaa5..a16ec93297 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ConsumerConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ConsumerConfig.java
@@ -31,6 +31,18 @@
     // networking framework client uses: netty, mina, etc.
     private String client;
 
+    // consumer thread pool type: cached, fixed, limit, eager
+    private String threadpool;
+
+    // consumer threadpool core thread size
+    private Integer corethreads;
+
+    // consumer threadpool thread size
+    private Integer threads;
+
+    // consumer threadpool queue size
+    private Integer queues;
+
     @Override
     public void setTimeout(Integer timeout) {
         super.setTimeout(timeout);
@@ -56,4 +68,40 @@ public String getClient() {
     public void setClient(String client) {
         this.client = client;
     }
+
+    public String getThreadpool() {
+        return threadpool;
+    }
+
+    public void setThreadpool(String threadpool) {
+        this.threadpool = threadpool;
+    }
+
+    public Boolean getDefault() {
+        return isDefault;
+    }
+
+    public Integer getCorethreads() {
+        return corethreads;
+    }
+
+    public void setCorethreads(Integer corethreads) {
+        this.corethreads = corethreads;
+    }
+
+    public Integer getThreads() {
+        return threads;
+    }
+
+    public void setThreads(Integer threads) {
+        this.threads = threads;
+    }
+
+    public Integer getQueues() {
+        return queues;
+    }
+
+    public void setQueues(Integer queues) {
+        this.queues = queues;
+    }
 }
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/test/java/com/alibaba/dubbo/config/ConsumerConfigTest.java b/dubbo-config/dubbo-config-api/src/test/java/com/alibaba/dubbo/config/ConsumerConfigTest.java
index 4eb2d4979d..6e288a35e2 100644
--- a/dubbo-config/dubbo-config-api/src/test/java/com/alibaba/dubbo/config/ConsumerConfigTest.java
+++ b/dubbo-config/dubbo-config-api/src/test/java/com/alibaba/dubbo/config/ConsumerConfigTest.java
@@ -50,4 +50,32 @@ public void testClient() throws Exception {
         consumer.setClient("client");
         assertThat(consumer.getClient(), equalTo("client"));
     }
+
+    @Test
+    public void testThreadpool() throws Exception {
+        ConsumerConfig consumer = new ConsumerConfig();
+        consumer.setThreadpool("fixed");
+        assertThat(consumer.getThreadpool(), equalTo("fixed"));
+    }
+
+    @Test
+    public void testCorethreads() throws Exception {
+        ConsumerConfig consumer = new ConsumerConfig();
+        consumer.setCorethreads(10);
+        assertThat(consumer.getCorethreads(), equalTo(10));
+    }
+
+    @Test
+    public void testThreads() throws Exception {
+        ConsumerConfig consumer = new ConsumerConfig();
+        consumer.setThreads(20);
+        assertThat(consumer.getThreads(), equalTo(20));
+    }
+
+    @Test
+    public void testQueues() throws Exception {
+        ConsumerConfig consumer = new ConsumerConfig();
+        consumer.setQueues(5);
+        assertThat(consumer.getQueues(), equalTo(5));
+    }
 }
diff --git a/dubbo-config/dubbo-config-spring/pom.xml b/dubbo-config/dubbo-config-spring/pom.xml
index a186182c49..3aa9d90522 100644
--- a/dubbo-config/dubbo-config-spring/pom.xml
+++ b/dubbo-config/dubbo-config-spring/pom.xml
@@ -1,157 +1,160 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>com.alibaba</groupId>
-        <artifactId>dubbo-config</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
-    </parent>
-    <artifactId>dubbo-config-spring</artifactId>
-    <packaging>jar</packaging>
-    <name>${project.artifactId}</name>
-    <description>The spring config module of dubbo project</description>
-    <properties>
-        <skip_maven_deploy>false</skip_maven_deploy>
-    </properties>
-    <dependencies>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-config-api</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-bootstrap</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-beans</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-web</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-context</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>javax.servlet-api</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-registry-default</artifactId>
-            <version>${project.parent.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-monitor-default</artifactId>
-            <version>${project.parent.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-dubbo</artifactId>
-            <version>${project.parent.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-rmi</artifactId>
-            <version>${project.parent.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-injvm</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-remoting-netty</artifactId>
-            <version>${project.parent.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-serialization-hessian2</artifactId>
-            <version>${project.parent.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.validation</groupId>
-            <artifactId>validation-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.hibernate</groupId>
-            <artifactId>hibernate-validator</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.glassfish</groupId>
-            <artifactId>javax.el</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-tx</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-test</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-    </dependencies>
-    <build>
-        <plugins>
-            <!-- upload xsd file command line
-            mvn org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload-single -Dwagon.fromFile=src/main/resources/META-INF/dubbo.xsd -Dwagon.url=dav:http://code.alibabatech.com/schema/dubbo/ -Dwagon.serverId=opensesame.releases.account
-            -->
-            <!--
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>wagon-maven-plugin</artifactId>
-                <version>1.0-beta-3</version>
-                <executions>
-                    <execution>
-                        <id>upload-schema</id>
-                        <phase>deploy</phase>
-                        <goals>
-                            <goal>upload-single</goal>
-                        </goals>
-                        <configuration>
-                            <fromFile>${basedir}/src/main/resources/META-INF/dubbo.xsd</fromFile>
-                            <url>dav:http://code.alibabatech.com/schema/dubbo/</url>
-                            <serverId>opensesame.releases.account</serverId>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            -->
-        </plugins>
-    </build>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.alibaba</groupId>
+        <artifactId>dubbo-config</artifactId>
+        <version>2.6.4-SNAPSHOT</version>
+    </parent>
+    <artifactId>dubbo-config-spring</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+    <description>The spring config module of dubbo project</description>
+    <properties>
+        <skip_maven_deploy>false</skip_maven_deploy>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-config-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-bootstrap</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-beans</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-registry-default</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-monitor-default</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-dubbo</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-rmi</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-injvm</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-remoting-netty</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-serialization-hessian2</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish</groupId>
+            <artifactId>javax.el</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-tx</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+    <build>
+        <plugins>
+            <!-- upload xsd file command line
+            mvn org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload-single -Dwagon.fromFile=src/main/resources/META-INF/dubbo.xsd -Dwagon.url=dav:http://code.alibabatech.com/schema/dubbo/ -Dwagon.serverId=opensesame.releases.account
+            -->
+            <!--
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>wagon-maven-plugin</artifactId>
+                <version>1.0-beta-3</version>
+                <executions>
+                    <execution>
+                        <id>upload-schema</id>
+                        <phase>deploy</phase>
+                        <goals>
+                            <goal>upload-single</goal>
+                        </goals>
+                        <configuration>
+                            <fromFile>${basedir}/src/main/resources/META-INF/dubbo.xsd</fromFile>
+                            <url>dav:http://code.alibabatech.com/schema/dubbo/</url>
+                            <serverId>opensesame.releases.account</serverId>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            -->
+        </plugins>
+    </build>
 </project>
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/initializer/DubboWebApplicationInitializer.java b/dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/initializer/DubboWebApplicationInitializer.java
deleted file mode 100644
index 8d0f79db14..0000000000
--- a/dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/initializer/DubboWebApplicationInitializer.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.config.spring.initializer;
-
-import org.springframework.web.context.AbstractContextLoaderInitializer;
-import org.springframework.web.context.WebApplicationContext;
-import org.springframework.web.context.support.XmlWebApplicationContext;
-
-/**
- * An initializer to register {@link DubboApplicationListener}
- * to the ApplicationContext seamlessly.
- */
-public class DubboWebApplicationInitializer extends AbstractContextLoaderInitializer {
-
-    /**
-     * This method won't be triggered if running on spring-boot.
-     * It only works when running under a servlet container.
-     * @return a WebApplicationContext with DubboApplicationListener registered.
-     */
-    @Override
-    protected WebApplicationContext createRootApplicationContext() {
-        XmlWebApplicationContext webApplicationContext = new XmlWebApplicationContext();
-        webApplicationContext.addApplicationListener(new DubboApplicationListener());
-        return webApplicationContext;
-    }
-}
diff --git a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/initializer/DubboApplicationContextInitializer.java b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/initializer/DubboApplicationContextInitializer.java
new file mode 100644
index 0000000000..36727e669f
--- /dev/null
+++ b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/initializer/DubboApplicationContextInitializer.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.config.spring.initializer;
+
+import org.springframework.context.ApplicationContextInitializer;
+import org.springframework.context.ConfigurableApplicationContext;
+
+/**
+ * Automatically register {@link DubboApplicationListener} to Spring context
+ * A {@link org.springframework.web.context.ContextLoaderListener} class is defined in
+ * src/main/resources/META-INF/web-fragment.xml
+ * In the web-fragment.xml, {@link DubboApplicationContextInitializer} is defined in context params.
+ * This file will be discovered if running under a servlet 3.0+ container.
+ * Even if user specifies {@link org.springframework.web.context.ContextLoaderListener} in web.xml,
+ * it will be merged to web.xml.
+ * If user specifies <metadata-complete="true" /> in web.xml, this will no take effect,
+ * unless user configures {@link DubboApplicationContextInitializer} explicitly in web.xml.
+ */
+public class DubboApplicationContextInitializer implements ApplicationContextInitializer {
+
+    @Override
+    public void initialize(ConfigurableApplicationContext applicationContext) {
+        applicationContext.addApplicationListener(new DubboApplicationListener());
+    }
+}
diff --git a/dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/initializer/DubboApplicationListener.java b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/initializer/DubboApplicationListener.java
similarity index 97%
rename from dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/initializer/DubboApplicationListener.java
rename to dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/initializer/DubboApplicationListener.java
index c3d72981b9..8b6409bd65 100644
--- a/dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/initializer/DubboApplicationListener.java
+++ b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/initializer/DubboApplicationListener.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.alibaba.dubbo.config.spring.initializer;
+package org.apache.dubbo.config.spring.initializer;
 
 import org.apache.dubbo.bootstrap.DubboBootstrap;
 import org.springframework.context.ApplicationEvent;
diff --git a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/compat/dubbo.xsd b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/compat/dubbo.xsd
index 91069146e1..2dbdde18e5 100644
--- a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/compat/dubbo.xsd
+++ b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/compat/dubbo.xsd
@@ -708,6 +708,26 @@
                         <xsd:documentation><![CDATA[ Transporter layer framework: netty mina.... ]]></xsd:documentation>
                     </xsd:annotation>
                 </xsd:attribute>
+                <xsd:attribute name="threadpool" type="xsd:string" use="optional">
+                    <xsd:annotation>
+                        <xsd:documentation><![CDATA[ Consumer threadpool: cached, fixed, limited, eager]]></xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
+                <xsd:attribute name="corethreads" type="xsd:string" use="optional">
+                    <xsd:annotation>
+                        <xsd:documentation><![CDATA[ The thread pool core threads size. ]]></xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
+                <xsd:attribute name="threads" type="xsd:string" use="optional">
+                    <xsd:annotation>
+                        <xsd:documentation><![CDATA[ The thread pool size. ]]></xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
+                <xsd:attribute name="queues" type="xsd:string" use="optional">
+                    <xsd:annotation>
+                        <xsd:documentation><![CDATA[ The thread pool queue size. ]]></xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
                 <xsd:anyAttribute namespace="##other" processContents="lax"/>
             </xsd:extension>
         </xsd:complexContent>
diff --git a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd
index 4efbc585ab..0c17e24771 100644
--- a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd
+++ b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd
@@ -708,6 +708,26 @@
                         <xsd:documentation><![CDATA[ Transporter layer framework: netty mina.... ]]></xsd:documentation>
                     </xsd:annotation>
                 </xsd:attribute>
+                <xsd:attribute name="threadpool" type="xsd:string" use="optional">
+                    <xsd:annotation>
+                        <xsd:documentation><![CDATA[ Consumer threadpool: cached, fixed, limited, eager]]></xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
+                <xsd:attribute name="corethreads" type="xsd:string" use="optional">
+                    <xsd:annotation>
+                        <xsd:documentation><![CDATA[ The thread pool core threads size. ]]></xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
+                <xsd:attribute name="threads" type="xsd:string" use="optional">
+                    <xsd:annotation>
+                        <xsd:documentation><![CDATA[ The thread pool size. ]]></xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
+                <xsd:attribute name="queues" type="xsd:string" use="optional">
+                    <xsd:annotation>
+                        <xsd:documentation><![CDATA[ The thread pool queue size. ]]></xsd:documentation>
+                    </xsd:annotation>
+                </xsd:attribute>
                 <xsd:anyAttribute namespace="##other" processContents="lax"/>
             </xsd:extension>
         </xsd:complexContent>
diff --git a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/web-fragment.xml b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/web-fragment.xml
new file mode 100644
index 0000000000..220874ab78
--- /dev/null
+++ b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/web-fragment.xml
@@ -0,0 +1,22 @@
+<web-fragment version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
+              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd">
+
+    <name>dubbo-fragment</name>
+
+    <ordering>
+        <before>
+            <others/>
+        </before>
+    </ordering>
+
+    <context-param>
+        <param-name>contextInitializerClasses</param-name>
+        <param-value>org.apache.dubbo.config.spring.initializer.DubboApplicationContextInitializer</param-value>
+    </context-param>
+
+    <listener>
+        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+    </listener>
+
+</web-fragment>
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-spring/src/test/java/com/alibaba/dubbo/config/spring/initializer/DubboApplicationListenerTest.java b/dubbo-config/dubbo-config-spring/src/test/java/com/alibaba/dubbo/config/spring/initializer/DubboApplicationListenerTest.java
index fdfe87ae1a..9220ce9176 100644
--- a/dubbo-config/dubbo-config-spring/src/test/java/com/alibaba/dubbo/config/spring/initializer/DubboApplicationListenerTest.java
+++ b/dubbo-config/dubbo-config-spring/src/test/java/com/alibaba/dubbo/config/spring/initializer/DubboApplicationListenerTest.java
@@ -17,7 +17,9 @@
 package com.alibaba.dubbo.config.spring.initializer;
 
 import com.alibaba.dubbo.config.DubboShutdownHook;
+
 import org.apache.dubbo.bootstrap.DubboBootstrap;
+import org.apache.dubbo.config.spring.initializer.DubboApplicationListener;
 import org.junit.Test;
 import org.mockito.Mockito;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
diff --git a/dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/initializer/DubboApplicationContextInitializerTest.java b/dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/initializer/DubboApplicationContextInitializerTest.java
new file mode 100644
index 0000000000..2c84095f4e
--- /dev/null
+++ b/dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/initializer/DubboApplicationContextInitializerTest.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.dubbo.config.spring.initializer;
+
+import org.apache.catalina.core.StandardContext;
+import org.apache.catalina.startup.ContextConfig;
+import org.apache.catalina.startup.Tomcat;
+import org.junit.Assert;
+import org.junit.Test;
+import org.springframework.web.context.ContextLoaderListener;
+
+
+public class DubboApplicationContextInitializerTest {
+
+    @Test
+    public void testSpringContextLoaderListenerInWebXml() throws Exception {
+        Tomcat tomcat = new Tomcat();
+        tomcat.setBaseDir("src/test/resources");
+        tomcat.setPort(12345);
+        StandardContext context = new StandardContext();
+        context.setName("test");
+        context.setDocBase("test");
+        context.setPath("/test");
+        context.addLifecycleListener(new ContextConfig());
+        tomcat.getHost().addChild(context);
+        tomcat.start();
+        // there should be 1 application listener
+        Assert.assertEquals(1, context.getApplicationLifecycleListeners().length);
+        // the first one should be Spring's built in ContextLoaderListener.
+        Assert.assertTrue(context.getApplicationLifecycleListeners()[0] instanceof ContextLoaderListener);
+        tomcat.stop();
+        tomcat.destroy();
+    }
+
+    @Test
+    public void testNoListenerInWebXml() throws Exception {
+        Tomcat tomcat = new Tomcat();
+        tomcat.setBaseDir("src/test/resources");
+        tomcat.setPort(12345);
+        StandardContext context = new StandardContext();
+        context.setName("test2");
+        context.setDocBase("test2");
+        context.setPath("/test2");
+        context.addLifecycleListener(new ContextConfig());
+        tomcat.getHost().addChild(context);
+        tomcat.start();
+        // there should be 1 application listener
+        Assert.assertEquals(1, context.getApplicationLifecycleListeners().length);
+        // the first one should be Spring's built in ContextLoaderListener.
+        Assert.assertTrue(context.getApplicationLifecycleListeners()[0] instanceof ContextLoaderListener);
+        tomcat.stop();
+        tomcat.destroy();
+    }
+
+    @Test
+    public void testMetadataComplete() throws Exception {
+        Tomcat tomcat = new Tomcat();
+        tomcat.setBaseDir("src/test/resources");
+        tomcat.setPort(12345);
+        StandardContext context = new StandardContext();
+        context.setName("test3");
+        context.setDocBase("test3");
+        context.setPath("/test3");
+        context.addLifecycleListener(new ContextConfig());
+        tomcat.getHost().addChild(context);
+        tomcat.start();
+        // there should be no application listeners
+        Assert.assertEquals(0, context.getApplicationLifecycleListeners().length);
+        tomcat.stop();
+        tomcat.destroy();
+    }
+
+}
diff --git a/dubbo-config/dubbo-config-spring/src/test/resources/applicationContext.xml b/dubbo-config/dubbo-config-spring/src/test/resources/applicationContext.xml
new file mode 100644
index 0000000000..977a8a43d0
--- /dev/null
+++ b/dubbo-config/dubbo-config-spring/src/test/resources/applicationContext.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+       http://www.springframework.org/schema/beans/spring-beans.xsd">
+</beans>
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-spring/src/test/resources/webapps/test/WEB-INF/web.xml b/dubbo-config/dubbo-config-spring/src/test/resources/webapps/test/WEB-INF/web.xml
new file mode 100644
index 0000000000..25214e23e3
--- /dev/null
+++ b/dubbo-config/dubbo-config-spring/src/test/resources/webapps/test/WEB-INF/web.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="3.1">
+    <display-name>dubbo-demo</display-name>
+
+    <context-param>
+        <param-name>contextConfigLocation</param-name>
+        <param-value>classpath:applicationContext.xml</param-value>
+    </context-param>
+
+    <listener>
+        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+    </listener>
+
+</web-app>
diff --git a/dubbo-config/dubbo-config-spring/src/test/resources/webapps/test2/WEB-INF/web.xml b/dubbo-config/dubbo-config-spring/src/test/resources/webapps/test2/WEB-INF/web.xml
new file mode 100644
index 0000000000..0da8d8a5db
--- /dev/null
+++ b/dubbo-config/dubbo-config-spring/src/test/resources/webapps/test2/WEB-INF/web.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="3.1">
+    <display-name>dubbo-demo</display-name>
+
+    <context-param>
+        <param-name>contextConfigLocation</param-name>
+        <param-value>classpath:applicationContext.xml</param-value>
+    </context-param>
+
+</web-app>
diff --git a/dubbo-config/dubbo-config-spring/src/test/resources/webapps/test3/WEB-INF/web.xml b/dubbo-config/dubbo-config-spring/src/test/resources/webapps/test3/WEB-INF/web.xml
new file mode 100644
index 0000000000..81a5a13f9e
--- /dev/null
+++ b/dubbo-config/dubbo-config-spring/src/test/resources/webapps/test3/WEB-INF/web.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="3.1" metadata-complete="true">
+    <display-name>dubbo-demo</display-name>
+
+    <context-param>
+        <param-name>contextConfigLocation</param-name>
+        <param-value>classpath:applicationContext.xml</param-value>
+    </context-param>
+
+</web-app>
diff --git a/dubbo-config/pom.xml b/dubbo-config/pom.xml
index 13fb0ccba5..1ca0a1af82 100644
--- a/dubbo-config/pom.xml
+++ b/dubbo-config/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-parent</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-config</artifactId>
     <packaging>pom</packaging>
diff --git a/dubbo-container/dubbo-container-api/pom.xml b/dubbo-container/dubbo-container-api/pom.xml
index 3897225e2d..40a3c34d7f 100644
--- a/dubbo-container/dubbo-container-api/pom.xml
+++ b/dubbo-container/dubbo-container-api/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-container</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-container-api</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-container/dubbo-container-log4j/pom.xml b/dubbo-container/dubbo-container-log4j/pom.xml
index 712101aad2..1f53ab449c 100644
--- a/dubbo-container/dubbo-container-log4j/pom.xml
+++ b/dubbo-container/dubbo-container-log4j/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-container</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-container-log4j</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-container/dubbo-container-logback/pom.xml b/dubbo-container/dubbo-container-logback/pom.xml
index 74b01709c4..5838a4c1da 100644
--- a/dubbo-container/dubbo-container-logback/pom.xml
+++ b/dubbo-container/dubbo-container-logback/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-container</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-container-logback</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-container/dubbo-container-spring/pom.xml b/dubbo-container/dubbo-container-spring/pom.xml
index 13d61ac635..383de1d17a 100644
--- a/dubbo-container/dubbo-container-spring/pom.xml
+++ b/dubbo-container/dubbo-container-spring/pom.xml
@@ -1,47 +1,47 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>com.alibaba</groupId>
-        <artifactId>dubbo-container</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
-    </parent>
-    <artifactId>dubbo-container-spring</artifactId>
-    <packaging>jar</packaging>
-    <name>${project.artifactId}</name>
-    <description>The spring container module of dubbo project</description>
-    <properties>
-        <skip_maven_deploy>false</skip_maven_deploy>
-    </properties>
-    <dependencies>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-container-api</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-context</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-config-spring</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
-    </dependencies>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.alibaba</groupId>
+        <artifactId>dubbo-container</artifactId>
+        <version>2.6.4-SNAPSHOT</version>
+    </parent>
+    <artifactId>dubbo-container-spring</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+    <description>The spring container module of dubbo project</description>
+    <properties>
+        <skip_maven_deploy>false</skip_maven_deploy>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-container-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-config-spring</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+    </dependencies>
 </project>
\ No newline at end of file
diff --git a/dubbo-container/dubbo-container-spring/src/main/java/com/alibaba/dubbo/container/spring/SpringContainer.java b/dubbo-container/dubbo-container-spring/src/main/java/com/alibaba/dubbo/container/spring/SpringContainer.java
index d4c03c6799..b5866f57c7 100644
--- a/dubbo-container/dubbo-container-spring/src/main/java/com/alibaba/dubbo/container/spring/SpringContainer.java
+++ b/dubbo-container/dubbo-container-spring/src/main/java/com/alibaba/dubbo/container/spring/SpringContainer.java
@@ -19,9 +19,9 @@
 import com.alibaba.dubbo.common.logger.Logger;
 import com.alibaba.dubbo.common.logger.LoggerFactory;
 import com.alibaba.dubbo.common.utils.ConfigUtils;
-import com.alibaba.dubbo.config.spring.initializer.DubboApplicationListener;
 import com.alibaba.dubbo.container.Container;
 
+import org.apache.dubbo.config.spring.initializer.DubboApplicationListener;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 /**
diff --git a/dubbo-container/pom.xml b/dubbo-container/pom.xml
index a846bf57ff..5bacc40f49 100644
--- a/dubbo-container/pom.xml
+++ b/dubbo-container/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-parent</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-container</artifactId>
     <packaging>pom</packaging>
diff --git a/dubbo-demo/dubbo-demo-api/pom.xml b/dubbo-demo/dubbo-demo-api/pom.xml
index 468af17be3..62cab74e54 100644
--- a/dubbo-demo/dubbo-demo-api/pom.xml
+++ b/dubbo-demo/dubbo-demo-api/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-demo</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-demo-api</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-demo/dubbo-demo-consumer/pom.xml b/dubbo-demo/dubbo-demo-consumer/pom.xml
index 2cb01d84da..9591b77042 100644
--- a/dubbo-demo/dubbo-demo-consumer/pom.xml
+++ b/dubbo-demo/dubbo-demo-consumer/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-demo</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-demo-consumer</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-demo/dubbo-demo-provider/pom.xml b/dubbo-demo/dubbo-demo-provider/pom.xml
index 801e7de049..8dbe6c3ac0 100644
--- a/dubbo-demo/dubbo-demo-provider/pom.xml
+++ b/dubbo-demo/dubbo-demo-provider/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-demo</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-demo-provider</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-demo/pom.xml b/dubbo-demo/pom.xml
index 6e9faf0491..3b0c39e5ea 100644
--- a/dubbo-demo/pom.xml
+++ b/dubbo-demo/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-parent</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-demo</artifactId>
     <packaging>pom</packaging>
diff --git a/dubbo-filter/dubbo-filter-cache/pom.xml b/dubbo-filter/dubbo-filter-cache/pom.xml
index 4931e16a9f..252e9132e2 100644
--- a/dubbo-filter/dubbo-filter-cache/pom.xml
+++ b/dubbo-filter/dubbo-filter-cache/pom.xml
@@ -1,48 +1,48 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>com.alibaba</groupId>
-        <artifactId>dubbo-filter</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
-    </parent>
-    <artifactId>dubbo-filter-cache</artifactId>
-    <packaging>jar</packaging>
-    <name>${project.artifactId}</name>
-    <description>The cache module of dubbo project</description>
-    <properties>
-        <skip_maven_deploy>false</skip_maven_deploy>
-    </properties>
-    <dependencies>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-api</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>javax.cache</groupId>
-            <artifactId>cache-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.hazelcast</groupId>
-            <artifactId>hazelcast</artifactId>
-            <scope>test</scope>
-            <version>${hazelcast_version}</version>
-        </dependency>
-    </dependencies>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.alibaba</groupId>
+        <artifactId>dubbo-filter</artifactId>
+        <version>2.6.4-SNAPSHOT</version>
+    </parent>
+    <artifactId>dubbo-filter-cache</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+    <description>The cache module of dubbo project</description>
+    <properties>
+        <skip_maven_deploy>false</skip_maven_deploy>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.cache</groupId>
+            <artifactId>cache-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.hazelcast</groupId>
+            <artifactId>hazelcast</artifactId>
+            <scope>test</scope>
+            <version>${hazelcast_version}</version>
+        </dependency>
+    </dependencies>
 </project>
\ No newline at end of file
diff --git a/dubbo-filter/dubbo-filter-validation/pom.xml b/dubbo-filter/dubbo-filter-validation/pom.xml
index 96b29fe78b..24cbcdac71 100644
--- a/dubbo-filter/dubbo-filter-validation/pom.xml
+++ b/dubbo-filter/dubbo-filter-validation/pom.xml
@@ -1,72 +1,72 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>com.alibaba</groupId>
-        <artifactId>dubbo-filter</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
-    </parent>
-    <artifactId>dubbo-filter-validation</artifactId>
-    <packaging>jar</packaging>
-    <name>${project.artifactId}</name>
-    <description>The validation module of dubbo project</description>
-    <properties>
-        <skip_maven_deploy>false</skip_maven_deploy>
-    </properties>
-    <dependencies>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-api</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>javax.validation</groupId>
-            <artifactId>validation-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.hibernate</groupId>
-            <artifactId>hibernate-validator</artifactId>
-            <scope>test</scope>
-            <version>${hibernate_validator_version}</version>
-        </dependency>
-        <dependency>
-            <groupId>javax.el</groupId>
-            <artifactId>javax.el-api</artifactId>
-            <scope>test</scope>
-            <version>${el_api_version}</version>
-        </dependency>
-        <dependency>
-            <groupId>javax.xml.bind</groupId>
-            <artifactId>jaxb-api</artifactId>
-            <scope>test</scope>
-            <version>${jaxb_api_version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.sun.xml.bind</groupId>
-            <artifactId>jaxb-impl</artifactId>
-            <scope>test</scope>
-            <version>${jaxb_api_version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.sun.xml.bind</groupId>
-            <artifactId>jaxb-core</artifactId>
-            <scope>test</scope>
-            <version>${jaxb_api_version}</version>
-        </dependency>
-    </dependencies>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.alibaba</groupId>
+        <artifactId>dubbo-filter</artifactId>
+        <version>2.6.4-SNAPSHOT</version>
+    </parent>
+    <artifactId>dubbo-filter-validation</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+    <description>The validation module of dubbo project</description>
+    <properties>
+        <skip_maven_deploy>false</skip_maven_deploy>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+            <scope>test</scope>
+            <version>${hibernate_validator_version}</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.el</groupId>
+            <artifactId>javax.el-api</artifactId>
+            <scope>test</scope>
+            <version>${el_api_version}</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+            <scope>test</scope>
+            <version>${jaxb_api_version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+            <scope>test</scope>
+            <version>${jaxb_api_version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-core</artifactId>
+            <scope>test</scope>
+            <version>${jaxb_api_version}</version>
+        </dependency>
+    </dependencies>
 </project>
\ No newline at end of file
diff --git a/dubbo-filter/pom.xml b/dubbo-filter/pom.xml
index 1a3add3d65..f73fae6d6f 100644
--- a/dubbo-filter/pom.xml
+++ b/dubbo-filter/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-parent</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-filter</artifactId>
     <packaging>pom</packaging>
diff --git a/dubbo-monitor/dubbo-monitor-api/pom.xml b/dubbo-monitor/dubbo-monitor-api/pom.xml
index cfca8b4786..93476c9652 100644
--- a/dubbo-monitor/dubbo-monitor-api/pom.xml
+++ b/dubbo-monitor/dubbo-monitor-api/pom.xml
@@ -18,7 +18,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-monitor</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-monitor-api</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-monitor/dubbo-monitor-default/pom.xml b/dubbo-monitor/dubbo-monitor-default/pom.xml
index 75e6dba8d4..69a1008523 100644
--- a/dubbo-monitor/dubbo-monitor-default/pom.xml
+++ b/dubbo-monitor/dubbo-monitor-default/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-monitor</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-monitor-default</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-monitor/pom.xml b/dubbo-monitor/pom.xml
index 2c3be2bf88..d0d73b446e 100644
--- a/dubbo-monitor/pom.xml
+++ b/dubbo-monitor/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-parent</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-monitor</artifactId>
     <packaging>pom</packaging>
diff --git a/dubbo-plugin/dubbo-qos/pom.xml b/dubbo-plugin/dubbo-qos/pom.xml
index 1a6257f861..bd9ef80068 100644
--- a/dubbo-plugin/dubbo-qos/pom.xml
+++ b/dubbo-plugin/dubbo-qos/pom.xml
@@ -18,7 +18,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-plugin</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
diff --git a/dubbo-plugin/pom.xml b/dubbo-plugin/pom.xml
index 54c44c2ec6..e44f3bc0be 100644
--- a/dubbo-plugin/pom.xml
+++ b/dubbo-plugin/pom.xml
@@ -18,7 +18,7 @@
     <parent>
         <artifactId>dubbo-parent</artifactId>
         <groupId>com.alibaba</groupId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
diff --git a/dubbo-registry/dubbo-registry-api/pom.xml b/dubbo-registry/dubbo-registry-api/pom.xml
index adefa0b176..f950eed0ad 100644
--- a/dubbo-registry/dubbo-registry-api/pom.xml
+++ b/dubbo-registry/dubbo-registry-api/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-registry</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-registry-api</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-registry/dubbo-registry-default/pom.xml b/dubbo-registry/dubbo-registry-default/pom.xml
index f4512b48e4..e9d2610f7c 100644
--- a/dubbo-registry/dubbo-registry-default/pom.xml
+++ b/dubbo-registry/dubbo-registry-default/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-registry</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-registry-default</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-registry/dubbo-registry-multicast/pom.xml b/dubbo-registry/dubbo-registry-multicast/pom.xml
index 0f974a4e84..bd73659869 100644
--- a/dubbo-registry/dubbo-registry-multicast/pom.xml
+++ b/dubbo-registry/dubbo-registry-multicast/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-registry</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-registry-multicast</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-registry/dubbo-registry-redis/pom.xml b/dubbo-registry/dubbo-registry-redis/pom.xml
index 7a0a129cad..264e4b6b22 100644
--- a/dubbo-registry/dubbo-registry-redis/pom.xml
+++ b/dubbo-registry/dubbo-registry-redis/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-registry</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-registry-redis</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-registry/dubbo-registry-zookeeper/pom.xml b/dubbo-registry/dubbo-registry-zookeeper/pom.xml
index 818f9d944d..ef24b3c2e4 100644
--- a/dubbo-registry/dubbo-registry-zookeeper/pom.xml
+++ b/dubbo-registry/dubbo-registry-zookeeper/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-registry</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-registry-zookeeper</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-registry/pom.xml b/dubbo-registry/pom.xml
index 011056107f..efd8574fda 100644
--- a/dubbo-registry/pom.xml
+++ b/dubbo-registry/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-parent</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-registry</artifactId>
     <packaging>pom</packaging>
diff --git a/dubbo-remoting/dubbo-remoting-api/pom.xml b/dubbo-remoting/dubbo-remoting-api/pom.xml
index 122edc5c64..31bf42fcea 100644
--- a/dubbo-remoting/dubbo-remoting-api/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-api/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-remoting</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-remoting-api</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-remoting/dubbo-remoting-grizzly/pom.xml b/dubbo-remoting/dubbo-remoting-grizzly/pom.xml
index b29b1d85b0..3d4de43e14 100644
--- a/dubbo-remoting/dubbo-remoting-grizzly/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-grizzly/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-remoting</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-remoting-grizzly</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-remoting/dubbo-remoting-http/pom.xml b/dubbo-remoting/dubbo-remoting-http/pom.xml
index bd599a91e0..3fa97b3800 100644
--- a/dubbo-remoting/dubbo-remoting-http/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-http/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-remoting</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-remoting-http</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-remoting/dubbo-remoting-mina/pom.xml b/dubbo-remoting/dubbo-remoting-mina/pom.xml
index 82e9a820f4..73c1019ad1 100644
--- a/dubbo-remoting/dubbo-remoting-mina/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-mina/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-remoting</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-remoting-mina</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-remoting/dubbo-remoting-netty/pom.xml b/dubbo-remoting/dubbo-remoting-netty/pom.xml
index 297d467e18..92bedd8446 100644
--- a/dubbo-remoting/dubbo-remoting-netty/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-netty/pom.xml
@@ -18,7 +18,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-remoting</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-remoting-netty</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-remoting/dubbo-remoting-netty4/pom.xml b/dubbo-remoting/dubbo-remoting-netty4/pom.xml
index 0185f84f37..cb97cc4fb7 100644
--- a/dubbo-remoting/dubbo-remoting-netty4/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-netty4/pom.xml
@@ -18,7 +18,7 @@
     <parent>
         <artifactId>dubbo-remoting</artifactId>
         <groupId>com.alibaba</groupId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
diff --git a/dubbo-remoting/dubbo-remoting-p2p/pom.xml b/dubbo-remoting/dubbo-remoting-p2p/pom.xml
index d0f71d676a..6c35e39e19 100644
--- a/dubbo-remoting/dubbo-remoting-p2p/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-p2p/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-remoting</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-remoting-p2p</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-remoting/dubbo-remoting-zookeeper/pom.xml b/dubbo-remoting/dubbo-remoting-zookeeper/pom.xml
index bbae5829dd..201d5e4991 100644
--- a/dubbo-remoting/dubbo-remoting-zookeeper/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-zookeeper/pom.xml
@@ -18,7 +18,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-remoting</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-remoting-zookeeper</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-remoting/pom.xml b/dubbo-remoting/pom.xml
index 54ce6145e9..3ae2b0233b 100644
--- a/dubbo-remoting/pom.xml
+++ b/dubbo-remoting/pom.xml
@@ -20,7 +20,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-parent</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-remoting</artifactId>
     <packaging>pom</packaging>
diff --git a/dubbo-rpc/dubbo-rpc-api/pom.xml b/dubbo-rpc/dubbo-rpc-api/pom.xml
index 16449a813a..2ca9e8e571 100644
--- a/dubbo-rpc/dubbo-rpc-api/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-api/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-rpc</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-rpc-api</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-rpc/dubbo-rpc-dubbo/pom.xml b/dubbo-rpc/dubbo-rpc-dubbo/pom.xml
index 5a91bf059f..eb4c5fa8f7 100644
--- a/dubbo-rpc/dubbo-rpc-dubbo/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-dubbo/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-rpc</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-rpc-dubbo</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/telnet/InvokeTelnetHandler.java b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/telnet/InvokeTelnetHandler.java
index 47f11f5b08..c04a2d0e33 100644
--- a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/telnet/InvokeTelnetHandler.java
+++ b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/telnet/InvokeTelnetHandler.java
@@ -60,7 +60,10 @@ private static boolean isMatch(Class<?>[] types, List<Object> args) {
         for (int i = 0; i < types.length; i++) {
             Class<?> type = types[i];
             Object arg = args.get(i);
-            if (ReflectUtils.isPrimitive(arg.getClass())) {
+            if (arg == null) { // judge null first and null match any parameter
+                continue;
+
+            } else if (ReflectUtils.isPrimitive(arg.getClass())) {
                 if (!ReflectUtils.isPrimitive(type)) {
                     return false;
                 }
diff --git a/dubbo-rpc/dubbo-rpc-hessian/pom.xml b/dubbo-rpc/dubbo-rpc-hessian/pom.xml
index 512ba2389d..258fa7a231 100644
--- a/dubbo-rpc/dubbo-rpc-hessian/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-hessian/pom.xml
@@ -1,57 +1,57 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>com.alibaba</groupId>
-        <artifactId>dubbo-rpc</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
-    </parent>
-    <artifactId>dubbo-rpc-hessian</artifactId>
-    <packaging>jar</packaging>
-    <name>${project.artifactId}</name>
-    <description>The hessian rpc module of dubbo project</description>
-    <properties>
-        <skip_maven_deploy>false</skip_maven_deploy>
-    </properties>
-    <dependencies>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-api</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-remoting-http</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.caucho</groupId>
-            <artifactId>hessian</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-serialization-jdk</artifactId>
-            <version>${project.parent.version}</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.alibaba</groupId>
+        <artifactId>dubbo-rpc</artifactId>
+        <version>2.6.4-SNAPSHOT</version>
+    </parent>
+    <artifactId>dubbo-rpc-hessian</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+    <description>The hessian rpc module of dubbo project</description>
+    <properties>
+        <skip_maven_deploy>false</skip_maven_deploy>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-remoting-http</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.caucho</groupId>
+            <artifactId>hessian</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-serialization-jdk</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
 </project>
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-http/pom.xml b/dubbo-rpc/dubbo-rpc-http/pom.xml
index b70eefc5a6..e6a811aa1d 100644
--- a/dubbo-rpc/dubbo-rpc-http/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-http/pom.xml
@@ -1,57 +1,57 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>com.alibaba</groupId>
-        <artifactId>dubbo-rpc</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
-    </parent>
-    <artifactId>dubbo-rpc-http</artifactId>
-    <packaging>jar</packaging>
-    <name>${project.artifactId}</name>
-    <description>The http rpc module of dubbo project</description>
-    <properties>
-        <skip_maven_deploy>false</skip_maven_deploy>
-    </properties>
-    <dependencies>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-api</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-remoting-http</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-context</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-web</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-serialization-jdk</artifactId>
-            <version>${project.parent.version}</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.alibaba</groupId>
+        <artifactId>dubbo-rpc</artifactId>
+        <version>2.6.4-SNAPSHOT</version>
+    </parent>
+    <artifactId>dubbo-rpc-http</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+    <description>The http rpc module of dubbo project</description>
+    <properties>
+        <skip_maven_deploy>false</skip_maven_deploy>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-remoting-http</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-serialization-jdk</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
 </project>
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-injvm/pom.xml b/dubbo-rpc/dubbo-rpc-injvm/pom.xml
index 390468549f..0ff8f53b21 100644
--- a/dubbo-rpc/dubbo-rpc-injvm/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-injvm/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-rpc</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-rpc-injvm</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-rpc/dubbo-rpc-memcached/pom.xml b/dubbo-rpc/dubbo-rpc-memcached/pom.xml
index 977831514e..6520c39dc8 100644
--- a/dubbo-rpc/dubbo-rpc-memcached/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-memcached/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-rpc</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-rpc-memcached</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-rpc/dubbo-rpc-redis/pom.xml b/dubbo-rpc/dubbo-rpc-redis/pom.xml
index 0857036110..78a091a9c5 100644
--- a/dubbo-rpc/dubbo-rpc-redis/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-redis/pom.xml
@@ -1,53 +1,53 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>com.alibaba</groupId>
-        <artifactId>dubbo-rpc</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
-    </parent>
-    <artifactId>dubbo-rpc-redis</artifactId>
-    <packaging>jar</packaging>
-    <name>${project.artifactId}</name>
-    <description>The redis rpc module of dubbo project</description>
-    <properties>
-        <skip_maven_deploy>false</skip_maven_deploy>
-    </properties>
-    <dependencies>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-api</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>redis.clients</groupId>
-            <artifactId>jedis</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.github.kstyrc</groupId>
-            <artifactId>embedded-redis</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-serialization-jdk</artifactId>
-            <version>${project.parent.version}</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.alibaba</groupId>
+        <artifactId>dubbo-rpc</artifactId>
+        <version>2.6.4-SNAPSHOT</version>
+    </parent>
+    <artifactId>dubbo-rpc-redis</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+    <description>The redis rpc module of dubbo project</description>
+    <properties>
+        <skip_maven_deploy>false</skip_maven_deploy>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.kstyrc</groupId>
+            <artifactId>embedded-redis</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-serialization-jdk</artifactId>
+            <version>${project.parent.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
 </project>
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-rest/pom.xml b/dubbo-rpc/dubbo-rpc-rest/pom.xml
index 9e3d866d3a..0f5f064b71 100644
--- a/dubbo-rpc/dubbo-rpc-rest/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-rest/pom.xml
@@ -18,7 +18,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-rpc</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
 	</parent>
 	<artifactId>dubbo-rpc-rest</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-rpc/dubbo-rpc-rmi/pom.xml b/dubbo-rpc/dubbo-rpc-rmi/pom.xml
index d20e9fb476..e47fbedc06 100644
--- a/dubbo-rpc/dubbo-rpc-rmi/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-rmi/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-rpc</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-rpc-rmi</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-rpc/dubbo-rpc-thrift/pom.xml b/dubbo-rpc/dubbo-rpc-thrift/pom.xml
index f7cc6c8cc7..7d57f738eb 100644
--- a/dubbo-rpc/dubbo-rpc-thrift/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-thrift/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-rpc</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-rpc-thrift</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-rpc/dubbo-rpc-webservice/pom.xml b/dubbo-rpc/dubbo-rpc-webservice/pom.xml
index 066a66a31f..4adf13f95f 100644
--- a/dubbo-rpc/dubbo-rpc-webservice/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-webservice/pom.xml
@@ -1,76 +1,76 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>com.alibaba</groupId>
-        <artifactId>dubbo-rpc</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
-    </parent>
-    <artifactId>dubbo-rpc-webservice</artifactId>
-    <packaging>jar</packaging>
-    <name>${project.artifactId}</name>
-    <description>The webservice rpc module of dubbo project</description>
-    <properties>
-        <skip_maven_deploy>false</skip_maven_deploy>
-    </properties>
-    <dependencies>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-api</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-remoting-http</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>javax.xml.bind</groupId>
-            <artifactId>jaxb-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.sun.xml.bind</groupId>
-            <artifactId>jaxb-impl</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.sun.xml.bind</groupId>
-            <artifactId>jaxb-core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>javax.activation</groupId>
-            <artifactId>javax.activation-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.sun.activation</groupId>
-            <artifactId>javax.activation</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-frontend-simple</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-transports-http</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-context</artifactId>
-        </dependency>
-    </dependencies>
-
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.alibaba</groupId>
+        <artifactId>dubbo-rpc</artifactId>
+        <version>2.6.4-SNAPSHOT</version>
+    </parent>
+    <artifactId>dubbo-rpc-webservice</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+    <description>The webservice rpc module of dubbo project</description>
+    <properties>
+        <skip_maven_deploy>false</skip_maven_deploy>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-remoting-http</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.activation</groupId>
+            <artifactId>javax.activation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.activation</groupId>
+            <artifactId>javax.activation</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-simple</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+        </dependency>
+    </dependencies>
+
 </project>
\ No newline at end of file
diff --git a/dubbo-rpc/pom.xml b/dubbo-rpc/pom.xml
index 389d592f3d..db2cb85379 100644
--- a/dubbo-rpc/pom.xml
+++ b/dubbo-rpc/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-parent</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-rpc</artifactId>
     <packaging>pom</packaging>
diff --git a/dubbo-serialization/dubbo-serialization-api/pom.xml b/dubbo-serialization/dubbo-serialization-api/pom.xml
index 1f09c4586d..069ac17b8a 100644
--- a/dubbo-serialization/dubbo-serialization-api/pom.xml
+++ b/dubbo-serialization/dubbo-serialization-api/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-serialization</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-serialization-api</artifactId>
     <packaging>jar</packaging>
@@ -38,7 +38,7 @@ limitations under the License.
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>hessian-lite</artifactId>
-            <version>3.2.3</version>
+            <version>3.2.4</version>
         </dependency>
         <dependency>
             <groupId>com.alibaba</groupId>
diff --git a/dubbo-serialization/dubbo-serialization-fastjson/pom.xml b/dubbo-serialization/dubbo-serialization-fastjson/pom.xml
index ac98621fb8..ac4724cd3f 100644
--- a/dubbo-serialization/dubbo-serialization-fastjson/pom.xml
+++ b/dubbo-serialization/dubbo-serialization-fastjson/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-serialization</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-serialization-fastjson</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-serialization/dubbo-serialization-fst/pom.xml b/dubbo-serialization/dubbo-serialization-fst/pom.xml
index 4274f52c98..784ab3d88a 100644
--- a/dubbo-serialization/dubbo-serialization-fst/pom.xml
+++ b/dubbo-serialization/dubbo-serialization-fst/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-serialization</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-serialization-fst</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-serialization/dubbo-serialization-hessian2/pom.xml b/dubbo-serialization/dubbo-serialization-hessian2/pom.xml
index 9ab7a6de3a..2f2e83c541 100644
--- a/dubbo-serialization/dubbo-serialization-hessian2/pom.xml
+++ b/dubbo-serialization/dubbo-serialization-hessian2/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-serialization</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-serialization-hessian2</artifactId>
     <packaging>jar</packaging>
@@ -38,7 +38,7 @@ limitations under the License.
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>hessian-lite</artifactId>
-            <version>3.2.3</version>
+            <version>3.2.4</version>
         </dependency>
     </dependencies>
 </project>
\ No newline at end of file
diff --git a/dubbo-serialization/dubbo-serialization-jdk/pom.xml b/dubbo-serialization/dubbo-serialization-jdk/pom.xml
index 2b0fd3ae06..2fe4fbb4c3 100644
--- a/dubbo-serialization/dubbo-serialization-jdk/pom.xml
+++ b/dubbo-serialization/dubbo-serialization-jdk/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-serialization</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-serialization-jdk</artifactId>
     <packaging>jar</packaging>
@@ -38,7 +38,7 @@ limitations under the License.
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>hessian-lite</artifactId>
-            <version>3.2.3</version>
+            <version>3.2.4</version>
         </dependency>
     </dependencies>
 </project>
\ No newline at end of file
diff --git a/dubbo-serialization/dubbo-serialization-kryo/pom.xml b/dubbo-serialization/dubbo-serialization-kryo/pom.xml
index a868862e33..2d5896fcea 100644
--- a/dubbo-serialization/dubbo-serialization-kryo/pom.xml
+++ b/dubbo-serialization/dubbo-serialization-kryo/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-serialization</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-serialization-kryo</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-serialization/pom.xml b/dubbo-serialization/pom.xml
index f5b3eddc6b..6ebe0120b2 100644
--- a/dubbo-serialization/pom.xml
+++ b/dubbo-serialization/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-parent</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-serialization</artifactId>
     <packaging>pom</packaging>
diff --git a/dubbo-test/dubbo-test-benchmark/pom.xml b/dubbo-test/dubbo-test-benchmark/pom.xml
index cc4877ae91..0859a3023b 100644
--- a/dubbo-test/dubbo-test-benchmark/pom.xml
+++ b/dubbo-test/dubbo-test-benchmark/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-test</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-test-benchmark</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-test/dubbo-test-compatibility/dubbo-test-spring3/pom.xml b/dubbo-test/dubbo-test-compatibility/dubbo-test-spring3/pom.xml
index 2600f4afba..a32ea9ea2b 100644
--- a/dubbo-test/dubbo-test-compatibility/dubbo-test-spring3/pom.xml
+++ b/dubbo-test/dubbo-test-compatibility/dubbo-test-spring3/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <artifactId>dubbo-test-compatibility</artifactId>
         <groupId>com.alibaba</groupId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
diff --git a/dubbo-test/dubbo-test-compatibility/pom.xml b/dubbo-test/dubbo-test-compatibility/pom.xml
index 733069bed2..fb13502f9c 100644
--- a/dubbo-test/dubbo-test-compatibility/pom.xml
+++ b/dubbo-test/dubbo-test-compatibility/pom.xml
@@ -21,7 +21,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-test</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-test-compatibility</artifactId>
     <packaging>pom</packaging>
diff --git a/dubbo-test/dubbo-test-examples/pom.xml b/dubbo-test/dubbo-test-examples/pom.xml
index 6d9fd8b6c0..ee058cc523 100644
--- a/dubbo-test/dubbo-test-examples/pom.xml
+++ b/dubbo-test/dubbo-test-examples/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-test</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-test-examples</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-test/dubbo-test-integration/pom.xml b/dubbo-test/dubbo-test-integration/pom.xml
index 391a5c707f..c2de6e07b6 100644
--- a/dubbo-test/dubbo-test-integration/pom.xml
+++ b/dubbo-test/dubbo-test-integration/pom.xml
@@ -19,7 +19,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-test</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
+        <version>2.6.4-SNAPSHOT</version>
     </parent>
     <artifactId>dubbo-test-integration</artifactId>
     <packaging>jar</packaging>
diff --git a/dubbo-test/pom.xml b/dubbo-test/pom.xml
index 7505067d45..a9072ca1de 100644
--- a/dubbo-test/pom.xml
+++ b/dubbo-test/pom.xml
@@ -1,218 +1,218 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>com.alibaba</groupId>
-        <artifactId>dubbo-parent</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
-    </parent>
-    <artifactId>dubbo-test</artifactId>
-    <packaging>pom</packaging>
-    <name>${project.artifactId}</name>
-    <description>The test module of dubbo project</description>
-    <properties>
-        <skip_maven_deploy>true</skip_maven_deploy>
-    </properties>
-    <modules>
-        <module>dubbo-test-benchmark</module>
-        <module>dubbo-test-compatibility</module>
-        <module>dubbo-test-integration</module>
-        <module>dubbo-test-examples</module>
-    </modules>
-
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>com.alibaba</groupId>
-                <artifactId>dubbo-bom</artifactId>
-                <version>${project.parent.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-cluster</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-common</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-config-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-config-spring</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-filter-cache</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-filter-validation</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-remoting-netty</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-remoting-netty4</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-remoting-mina</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-remoting-grizzly</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-remoting-p2p</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-remoting-http</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-dubbo</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-injvm</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-rmi</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-hessian</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-http</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-webservice</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-thrift</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-memcached</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-redis</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-rest</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-registry-default</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-registry-multicast</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-registry-zookeeper</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-registry-redis</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-monitor-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-monitor-default</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-container-spring</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-container-log4j</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-container-logback</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-qos</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>hessian-lite</artifactId>
-            <version>3.2.3</version>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-serialization-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-serialization-hessian2</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-serialization-fst</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-serialization-fastjson</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-serialization-kryo</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-serialization-jdk</artifactId>
-            <version>2.6.3-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.hibernate</groupId>
-            <artifactId>hibernate-validator</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.glassfish</groupId>
-            <artifactId>javax.el</artifactId>
-        </dependency>
-    </dependencies>
-</project>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.alibaba</groupId>
+        <artifactId>dubbo-parent</artifactId>
+        <version>2.6.4-SNAPSHOT</version>
+    </parent>
+    <artifactId>dubbo-test</artifactId>
+    <packaging>pom</packaging>
+    <name>${project.artifactId}</name>
+    <description>The test module of dubbo project</description>
+    <properties>
+        <skip_maven_deploy>true</skip_maven_deploy>
+    </properties>
+    <modules>
+        <module>dubbo-test-benchmark</module>
+        <module>dubbo-test-compatibility</module>
+        <module>dubbo-test-integration</module>
+        <module>dubbo-test-examples</module>
+    </modules>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>com.alibaba</groupId>
+                <artifactId>dubbo-bom</artifactId>
+                <version>${project.parent.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-cluster</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-config-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-config-spring</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-filter-cache</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-filter-validation</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-remoting-netty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-remoting-netty4</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-remoting-mina</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-remoting-grizzly</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-remoting-p2p</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-remoting-http</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-dubbo</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-injvm</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-rmi</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-hessian</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-http</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-webservice</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-thrift</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-memcached</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-redis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-rest</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-registry-default</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-registry-multicast</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-registry-zookeeper</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-registry-redis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-monitor-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-monitor-default</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-container-spring</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-container-log4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-container-logback</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-qos</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>hessian-lite</artifactId>
+            <version>3.2.4</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-serialization-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-serialization-hessian2</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-serialization-fst</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-serialization-fastjson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-serialization-kryo</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-serialization-jdk</artifactId>
+            <version>2.6.4-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish</groupId>
+            <artifactId>javax.el</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/hessian-lite/pom.xml b/hessian-lite/pom.xml
deleted file mode 100644
index 911e726700..0000000000
--- a/hessian-lite/pom.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>com.alibaba</groupId>
-        <artifactId>dubbo-parent</artifactId>
-        <version>2.6.3-SNAPSHOT</version>
-    </parent>
-    <artifactId>hessian-lite</artifactId>
-    <packaging>jar</packaging>
-    <version>3.2.3</version>
-    <name>Hessian Lite(Alibaba embed version)</name>
-</project>
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/HessianException.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/HessianException.java
deleted file mode 100644
index f16146cac4..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/HessianException.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian;
-
-/**
- * Base runtime exception for Hessian exceptions.
- */
-public class HessianException extends RuntimeException {
-    /**
-     * Zero-arg constructor.
-     */
-    public HessianException() {
-    }
-
-    /**
-     * Create the exception.
-     */
-    public HessianException(String message) {
-        super(message);
-    }
-
-    /**
-     * Create the exception.
-     */
-    public HessianException(String message, Throwable rootCause) {
-        super(message, rootCause);
-    }
-
-    /**
-     * Create the exception.
-     */
-    public HessianException(Throwable rootCause) {
-        super(rootCause);
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractDeserializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractDeserializer.java
deleted file mode 100644
index 1946f4a84d..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractDeserializer.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-
-/**
- * Deserializing an object.
- */
-abstract public class AbstractDeserializer implements Deserializer {
-    @Override
-    public Class getType() {
-        return Object.class;
-    }
-
-    @Override
-    public Object readObject(AbstractHessianInput in)
-            throws IOException {
-        Object obj = in.readObject();
-
-        String className = getClass().getName();
-
-        if (obj != null)
-            throw error(className + ": unexpected object " + obj.getClass().getName() + " (" + obj + ")");
-        else
-            throw error(className + ": unexpected null value");
-    }
-
-    @Override
-    public Object readList(AbstractHessianInput in, int length)
-            throws IOException {
-        throw new UnsupportedOperationException(String.valueOf(this));
-    }
-
-    @Override
-    public Object readList(AbstractHessianInput in, int length, Class<?> expectType) throws IOException {
-        if (expectType == null) {
-            return readList(in, length);
-        }
-        throw new UnsupportedOperationException(String.valueOf(this));
-    }
-
-    @Override
-    public Object readLengthList(AbstractHessianInput in, int length)
-            throws IOException {
-        throw new UnsupportedOperationException(String.valueOf(this));
-    }
-
-    @Override
-    public Object readLengthList(AbstractHessianInput in, int length, Class<?> expectType) throws IOException {
-        if (expectType == null) {
-            return readLengthList(in, length);
-        }
-        throw new UnsupportedOperationException(String.valueOf(this));
-    }
-
-    @Override
-    public Object readMap(AbstractHessianInput in)
-            throws IOException {
-        Object obj = in.readObject();
-
-        String className = getClass().getName();
-
-        if (obj != null)
-            throw error(className + ": unexpected object " + obj.getClass().getName() + " (" + obj + ")");
-        else
-            throw error(className + ": unexpected null value");
-    }
-
-    @Override
-    public Object readMap(AbstractHessianInput in, Class<?> expectKeyType, Class<?> expectValueType) throws IOException {
-        if (expectKeyType == null && expectValueType == null) {
-            return readMap(in);
-        }
-        throw new UnsupportedOperationException(String.valueOf(this));
-    }
-
-    @Override
-    public Object readObject(AbstractHessianInput in, String[] fieldNames)
-            throws IOException {
-        throw new UnsupportedOperationException(String.valueOf(this));
-    }
-
-    protected HessianProtocolException error(String msg) {
-        return new HessianProtocolException(msg);
-    }
-
-    protected String codeName(int ch) {
-        if (ch < 0)
-            return "end of file";
-        else
-            return "0x" + Integer.toHexString(ch & 0xff);
-    }
-
-    protected SerializerFactory findSerializerFactory(AbstractHessianInput in) {
-        SerializerFactory serializerFactory = null;
-        if (in instanceof Hessian2Input) {
-            serializerFactory = ((Hessian2Input) in).findSerializerFactory();
-        } else if (in instanceof HessianInput) {
-            serializerFactory = ((HessianInput) in).getSerializerFactory();
-        }
-        return serializerFactory == null ? new SerializerFactory() : serializerFactory;
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractHessianInput.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractHessianInput.java
deleted file mode 100644
index 1d63fec368..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractHessianInput.java
+++ /dev/null
@@ -1,457 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.util.List;
-
-/**
- * Abstract base class for Hessian requests.  Hessian users should only
- * need to use the methods in this class.
- * <p>
- * <pre>
- * AbstractHessianInput in = ...; // get input
- * String value;
- *
- * in.startReply();         // read reply header
- * value = in.readString(); // read string value
- * in.completeReply();      // read reply footer
- * </pre>
- */
-abstract public class AbstractHessianInput {
-    private HessianRemoteResolver resolver;
-
-    /**
-     * Initialize the Hessian stream with the underlying input stream.
-     */
-    public void init(InputStream is) {
-    }
-
-    /**
-     * Returns the call's method
-     */
-    abstract public String getMethod();
-
-    /**
-     * Sets the resolver used to lookup remote objects.
-     */
-    public HessianRemoteResolver getRemoteResolver() {
-        return resolver;
-    }
-
-    /**
-     * Sets the resolver used to lookup remote objects.
-     */
-    public void setRemoteResolver(HessianRemoteResolver resolver) {
-        this.resolver = resolver;
-    }
-
-    /**
-     * Sets the serializer factory.
-     */
-    public void setSerializerFactory(SerializerFactory ser) {
-    }
-
-    /**
-     * Reads the call
-     * <p>
-     * <pre>
-     * c major minor
-     * </pre>
-     */
-    abstract public int readCall()
-            throws IOException;
-
-    /**
-     * For backward compatibility with HessianSkeleton
-     */
-    public void skipOptionalCall()
-            throws IOException {
-    }
-
-    /**
-     * Reads a header, returning null if there are no headers.
-     * <p>
-     * <pre>
-     * H b16 b8 value
-     * </pre>
-     */
-    abstract public String readHeader()
-            throws IOException;
-
-    /**
-     * Starts reading the call
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * m b16 b8 method
-     * </pre>
-     */
-    abstract public String readMethod()
-            throws IOException;
-
-    /**
-     * Reads the number of method arguments
-     *
-     * @return -1 for a variable length (hessian 1.0)
-     */
-    public int readMethodArgLength()
-            throws IOException {
-        return -1;
-    }
-
-    /**
-     * Starts reading the call, including the headers.
-     * <p>
-     * <p>The call expects the following protocol data
-     * <p>
-     * <pre>
-     * c major minor
-     * m b16 b8 method
-     * </pre>
-     */
-    abstract public void startCall()
-            throws IOException;
-
-    /**
-     * Completes reading the call
-     * <p>
-     * <p>The call expects the following protocol data
-     * <p>
-     * <pre>
-     * Z
-     * </pre>
-     */
-    abstract public void completeCall()
-            throws IOException;
-
-    /**
-     * Reads a reply as an object.
-     * If the reply has a fault, throws the exception.
-     */
-    abstract public Object readReply(Class expectedClass)
-            throws Throwable;
-
-    /**
-     * Starts reading the reply
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * r
-     * v
-     * </pre>
-     */
-    abstract public void startReply()
-            throws Throwable;
-
-    /**
-     * Completes reading the call
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * z
-     * </pre>
-     */
-    abstract public void completeReply()
-            throws IOException;
-
-    /**
-     * Reads a boolean
-     * <p>
-     * <pre>
-     * T
-     * F
-     * </pre>
-     */
-    abstract public boolean readBoolean()
-            throws IOException;
-
-    /**
-     * Reads a null
-     * <p>
-     * <pre>
-     * N
-     * </pre>
-     */
-    abstract public void readNull()
-            throws IOException;
-
-    /**
-     * Reads an integer
-     * <p>
-     * <pre>
-     * I b32 b24 b16 b8
-     * </pre>
-     */
-    abstract public int readInt()
-            throws IOException;
-
-    /**
-     * Reads a long
-     * <p>
-     * <pre>
-     * L b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre>
-     */
-    abstract public long readLong()
-            throws IOException;
-
-    /**
-     * Reads a double.
-     * <p>
-     * <pre>
-     * D b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre>
-     */
-    abstract public double readDouble()
-            throws IOException;
-
-    /**
-     * Reads a date.
-     * <p>
-     * <pre>
-     * T b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre>
-     */
-    abstract public long readUTCDate()
-            throws IOException;
-
-    /**
-     * Reads a string encoded in UTF-8
-     * <p>
-     * <pre>
-     * s b16 b8 non-final string chunk
-     * S b16 b8 final string chunk
-     * </pre>
-     */
-    abstract public String readString()
-            throws IOException;
-
-    /**
-     * Reads an XML node encoded in UTF-8
-     * <p>
-     * <pre>
-     * x b16 b8 non-final xml chunk
-     * X b16 b8 final xml chunk
-     * </pre>
-     */
-    public org.w3c.dom.Node readNode()
-            throws IOException {
-        throw new UnsupportedOperationException(getClass().getSimpleName());
-    }
-
-    /**
-     * Starts reading a string.  All the characters must be read before
-     * calling the next method.  The actual characters will be read with
-     * the reader's read() or read(char [], int, int).
-     * <p>
-     * <pre>
-     * s b16 b8 non-final string chunk
-     * S b16 b8 final string chunk
-     * </pre>
-     */
-    abstract public Reader getReader()
-            throws IOException;
-
-    /**
-     * Starts reading a byte array using an input stream.  All the bytes
-     * must be read before calling the following method.
-     * <p>
-     * <pre>
-     * b b16 b8 non-final binary chunk
-     * B b16 b8 final binary chunk
-     * </pre>
-     */
-    abstract public InputStream readInputStream()
-            throws IOException;
-
-    /**
-     * Reads a byte array.
-     * <p>
-     * <pre>
-     * b b16 b8 non-final binary chunk
-     * B b16 b8 final binary chunk
-     * </pre>
-     */
-    abstract public byte[] readBytes()
-            throws IOException;
-
-    /**
-     * Reads an arbitrary object from the input stream.
-     *
-     * @param expectedClass the expected class if the protocol doesn't supply it.
-     */
-    abstract public Object readObject(Class expectedClass)
-            throws IOException;
-
-    /**
-     * Reads an arbitrary object from the input stream.
-     *
-     * @param expectedClass the expected class if the protocol doesn't supply it.
-     * @param expectedTypes the runtime type hints, eg: expectedClass equals Map, expectedTypes can
-     *                      equals String.class, Short.class
-     */
-    public Object readObject(Class expectedClass, Class<?>... expectedTypes)
-            throws IOException {
-        throw new UnsupportedOperationException(String.valueOf(this));
-    }
-
-    /**
-     * Reads an arbitrary object from the input stream.
-     */
-    abstract public Object readObject()
-            throws IOException;
-
-    /**
-     * Reads an arbitrary object from the input stream.
-     *
-     * @param expectedTypes the runtime type hints, eg: expectedTypes can
-     *                      equals String.class, Short.class for HashMap
-     */
-    public Object readObject(List<Class<?>> expectedTypes)
-            throws IOException {
-        throw new UnsupportedOperationException(String.valueOf(this));
-    }
-
-    /**
-     * Reads a remote object reference to the stream.  The type is the
-     * type of the remote interface.
-     * <p>
-     * <code><pre>
-     * 'r' 't' b16 b8 type url
-     * </pre></code>
-     */
-    abstract public Object readRemote()
-            throws IOException;
-
-    /**
-     * Reads a reference
-     * <p>
-     * <pre>
-     * R b32 b24 b16 b8
-     * </pre>
-     */
-    abstract public Object readRef()
-            throws IOException;
-
-    /**
-     * Adds an object reference.
-     */
-    abstract public int addRef(Object obj)
-            throws IOException;
-
-    /**
-     * Sets an object reference.
-     */
-    abstract public void setRef(int i, Object obj)
-            throws IOException;
-
-    /**
-     * Resets the references for streaming.
-     */
-    public void resetReferences() {
-    }
-
-    /**
-     * Reads the start of a list
-     */
-    abstract public int readListStart()
-            throws IOException;
-
-    /**
-     * Reads the length of a list.
-     */
-    abstract public int readLength()
-            throws IOException;
-
-    /**
-     * Reads the start of a map
-     */
-    abstract public int readMapStart()
-            throws IOException;
-
-    /**
-     * Reads an object type.
-     */
-    abstract public String readType()
-            throws IOException;
-
-    /**
-     * Returns true if the data has ended.
-     */
-    abstract public boolean isEnd()
-            throws IOException;
-
-    /**
-     * Read the end byte
-     */
-    abstract public void readEnd()
-            throws IOException;
-
-    /**
-     * Read the end byte
-     */
-    abstract public void readMapEnd()
-            throws IOException;
-
-    /**
-     * Read the end byte
-     */
-    abstract public void readListEnd()
-            throws IOException;
-
-    public void close()
-            throws IOException {
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractHessianOutput.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractHessianOutput.java
deleted file mode 100644
index 602140811a..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractHessianOutput.java
+++ /dev/null
@@ -1,515 +0,0 @@
-/*
- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * Abstract output stream for Hessian requests.
- * <p>
- * <pre>
- * OutputStream os = ...; // from http connection
- * AbstractOutput out = new HessianSerializerOutput(os);
- * String value;
- *
- * out.startCall("hello");  // start hello call
- * out.writeString("arg1"); // write a string argument
- * out.completeCall();      // complete the call
- * </pre>
- */
-abstract public class AbstractHessianOutput {
-    // serializer factory
-    protected SerializerFactory _serializerFactory;
-
-    /**
-     * Gets the serializer factory.
-     */
-    public SerializerFactory getSerializerFactory() {
-        return _serializerFactory;
-    }
-
-    /**
-     * Sets the serializer factory.
-     */
-    public void setSerializerFactory(SerializerFactory factory) {
-        _serializerFactory = factory;
-    }
-
-    /**
-     * Gets the serializer factory.
-     */
-    public final SerializerFactory findSerializerFactory() {
-        SerializerFactory factory = _serializerFactory;
-
-        if (factory == null)
-            _serializerFactory = factory = new SerializerFactory();
-
-        return factory;
-    }
-
-    /**
-     * Initialize the output with a new underlying stream.
-     */
-    public void init(OutputStream os) {
-    }
-
-    /**
-     * Writes a complete method call.
-     */
-    public void call(String method, Object[] args)
-            throws IOException {
-        int length = args != null ? args.length : 0;
-
-        startCall(method, length);
-
-        for (int i = 0; i < length; i++)
-            writeObject(args[i]);
-
-        completeCall();
-    }
-
-    /**
-     * Starts the method call:
-     * <p>
-     * <code><pre>
-     * C
-     * </pre></code>
-     *
-     * @param method the method name to call.
-     */
-    abstract public void startCall()
-            throws IOException;
-
-    /**
-     * Starts the method call:
-     * <p>
-     * <code><pre>
-     * C string int
-     * </pre></code>
-     *
-     * @param method the method name to call.
-     */
-    abstract public void startCall(String method, int length)
-            throws IOException;
-
-    /**
-     * For Hessian 2.0, use the Header envelope instead
-     *
-     * @deprecated
-     */
-    public void writeHeader(String name)
-            throws IOException {
-        throw new UnsupportedOperationException(getClass().getSimpleName());
-    }
-
-    /**
-     * Writes the method tag.
-     * <p>
-     * <code><pre>
-     * string
-     * </pre></code>
-     *
-     * @param method the method name to call.
-     */
-    abstract public void writeMethod(String method)
-            throws IOException;
-
-    /**
-     * Completes the method call:
-     * <p>
-     * <code><pre>
-     * </pre></code>
-     */
-    abstract public void completeCall()
-            throws IOException;
-
-    /**
-     * Writes a boolean value to the stream.  The boolean will be written
-     * with the following syntax:
-     * <p>
-     * <code><pre>
-     * T
-     * F
-     * </pre></code>
-     *
-     * @param value the boolean value to write.
-     */
-    abstract public void writeBoolean(boolean value)
-            throws IOException;
-
-    /**
-     * Writes an integer value to the stream.  The integer will be written
-     * with the following syntax:
-     * <p>
-     * <code><pre>
-     * I b32 b24 b16 b8
-     * </pre></code>
-     *
-     * @param value the integer value to write.
-     */
-    abstract public void writeInt(int value)
-            throws IOException;
-
-    /**
-     * Writes a long value to the stream.  The long will be written
-     * with the following syntax:
-     * <p>
-     * <code><pre>
-     * L b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre></code>
-     *
-     * @param value the long value to write.
-     */
-    abstract public void writeLong(long value)
-            throws IOException;
-
-    /**
-     * Writes a double value to the stream.  The double will be written
-     * with the following syntax:
-     * <p>
-     * <code><pre>
-     * D b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre></code>
-     *
-     * @param value the double value to write.
-     */
-    abstract public void writeDouble(double value)
-            throws IOException;
-
-    /**
-     * Writes a date to the stream.
-     * <p>
-     * <code><pre>
-     * T  b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre></code>
-     *
-     * @param time the date in milliseconds from the epoch in UTC
-     */
-    abstract public void writeUTCDate(long time)
-            throws IOException;
-
-    /**
-     * Writes a null value to the stream.
-     * The null will be written with the following syntax
-     * <p>
-     * <code><pre>
-     * N
-     * </pre></code>
-     *
-     * @param value the string value to write.
-     */
-    abstract public void writeNull()
-            throws IOException;
-
-    /**
-     * Writes a string value to the stream using UTF-8 encoding.
-     * The string will be written with the following syntax:
-     * <p>
-     * <code><pre>
-     * S b16 b8 string-value
-     * </pre></code>
-     * <p>
-     * If the value is null, it will be written as
-     * <p>
-     * <code><pre>
-     * N
-     * </pre></code>
-     *
-     * @param value the string value to write.
-     */
-    abstract public void writeString(String value)
-            throws IOException;
-
-    /**
-     * Writes a string value to the stream using UTF-8 encoding.
-     * The string will be written with the following syntax:
-     * <p>
-     * <code><pre>
-     * S b16 b8 string-value
-     * </pre></code>
-     * <p>
-     * If the value is null, it will be written as
-     * <p>
-     * <code><pre>
-     * N
-     * </pre></code>
-     *
-     * @param value the string value to write.
-     */
-    abstract public void writeString(char[] buffer, int offset, int length)
-            throws IOException;
-
-    /**
-     * Writes a byte array to the stream.
-     * The array will be written with the following syntax:
-     * <p>
-     * <code><pre>
-     * B b16 b18 bytes
-     * </pre></code>
-     * <p>
-     * If the value is null, it will be written as
-     * <p>
-     * <code><pre>
-     * N
-     * </pre></code>
-     *
-     * @param value the string value to write.
-     */
-    abstract public void writeBytes(byte[] buffer)
-            throws IOException;
-
-    /**
-     * Writes a byte array to the stream.
-     * The array will be written with the following syntax:
-     * <p>
-     * <code><pre>
-     * B b16 b18 bytes
-     * </pre></code>
-     * <p>
-     * If the value is null, it will be written as
-     * <p>
-     * <code><pre>
-     * N
-     * </pre></code>
-     *
-     * @param value the string value to write.
-     */
-    abstract public void writeBytes(byte[] buffer, int offset, int length)
-            throws IOException;
-
-    /**
-     * Writes a byte buffer to the stream.
-     */
-    abstract public void writeByteBufferStart()
-            throws IOException;
-
-    /**
-     * Writes a byte buffer to the stream.
-     * <p>
-     * <code><pre>
-     * b b16 b18 bytes
-     * </pre></code>
-     *
-     * @param value the string value to write.
-     */
-    abstract public void writeByteBufferPart(byte[] buffer,
-                                             int offset,
-                                             int length)
-            throws IOException;
-
-    /**
-     * Writes the last chunk of a byte buffer to the stream.
-     * <p>
-     * <code><pre>
-     * b b16 b18 bytes
-     * </pre></code>
-     *
-     * @param value the string value to write.
-     */
-    abstract public void writeByteBufferEnd(byte[] buffer,
-                                            int offset,
-                                            int length)
-            throws IOException;
-
-    /**
-     * Writes a reference.
-     * <p>
-     * <code><pre>
-     * Q int
-     * </pre></code>
-     *
-     * @param value the integer value to write.
-     */
-    abstract protected void writeRef(int value)
-            throws IOException;
-
-    /**
-     * Removes a reference.
-     */
-    abstract public boolean removeRef(Object obj)
-            throws IOException;
-
-    /**
-     * Replaces a reference from one object to another.
-     */
-    abstract public boolean replaceRef(Object oldRef, Object newRef)
-            throws IOException;
-
-    /**
-     * Adds an object to the reference list.  If the object already exists,
-     * writes the reference, otherwise, the caller is responsible for
-     * the serialization.
-     * <p>
-     * <code><pre>
-     * R b32 b24 b16 b8
-     * </pre></code>
-     *
-     * @param object the object to add as a reference.
-     * @return true if the object has already been written.
-     */
-    abstract public boolean addRef(Object object)
-            throws IOException;
-
-    /**
-     * Resets the references for streaming.
-     */
-    public void resetReferences() {
-    }
-
-    /**
-     * Writes a generic object to the output stream.
-     */
-    abstract public void writeObject(Object object)
-            throws IOException;
-
-    /**
-     * Writes the list header to the stream.  List writers will call
-     * <code>writeListBegin</code> followed by the list contents and then
-     * call <code>writeListEnd</code>.
-     * <p>
-     * <code><pre>
-     * V
-     *   x13 java.util.ArrayList   # type
-     *   x93                       # length=3
-     *   x91                       # 1
-     *   x92                       # 2
-     *   x93                       # 3
-     * &lt;/list>
-     * </pre></code>
-     */
-    abstract public boolean writeListBegin(int length, String type)
-            throws IOException;
-
-    /**
-     * Writes the tail of the list to the stream.
-     */
-    abstract public void writeListEnd()
-            throws IOException;
-
-    /**
-     * Writes the map header to the stream.  Map writers will call
-     * <code>writeMapBegin</code> followed by the map contents and then
-     * call <code>writeMapEnd</code>.
-     * <p>
-     * <code><pre>
-     * M type (<key> <value>)* Z
-     * </pre></code>
-     */
-    abstract public void writeMapBegin(String type)
-            throws IOException;
-
-    /**
-     * Writes the tail of the map to the stream.
-     */
-    abstract public void writeMapEnd()
-            throws IOException;
-
-    /**
-     * Writes the object header to the stream (for Hessian 2.0), or a
-     * Map for Hessian 1.0.  Object writers will call
-     * <code>writeObjectBegin</code> followed by the map contents and then
-     * call <code>writeObjectEnd</code>.
-     * <p>
-     * <code><pre>
-     * C type int <key>*
-     * C int <value>*
-     * </pre></code>
-     *
-     * @return true if the object has already been defined.
-     */
-    public int writeObjectBegin(String type)
-            throws IOException {
-        writeMapBegin(type);
-
-        return -2;
-    }
-
-    /**
-     * Writes the end of the class.
-     */
-    public void writeClassFieldLength(int len)
-            throws IOException {
-    }
-
-    /**
-     * Writes the tail of the object to the stream.
-     */
-    public void writeObjectEnd()
-            throws IOException {
-    }
-
-    public void writeReply(Object o)
-            throws IOException {
-        startReply();
-        writeObject(o);
-        completeReply();
-    }
-
-
-    public void startReply()
-            throws IOException {
-    }
-
-    public void completeReply()
-            throws IOException {
-    }
-
-    public void writeFault(String code, String message, Object detail)
-            throws IOException {
-    }
-
-    public void flush()
-            throws IOException {
-    }
-
-    public void close()
-            throws IOException {
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractHessianResolver.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractHessianResolver.java
deleted file mode 100644
index 72a9822af6..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractHessianResolver.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-
-/**
- * Looks up remote objects.  The default just returns a HessianRemote object.
- */
-public class AbstractHessianResolver implements HessianRemoteResolver {
-    /**
-     * Looks up a proxy object.
-     */
-    @Override
-    public Object lookup(String type, String url)
-            throws IOException {
-        return new HessianRemote(type, url);
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractListDeserializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractListDeserializer.java
deleted file mode 100644
index f578d29049..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractListDeserializer.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-
-/**
- * Deserializing a JDK 1.2 Collection.
- */
-public class AbstractListDeserializer extends AbstractDeserializer {
-    @Override
-    public Object readObject(AbstractHessianInput in)
-            throws IOException {
-        Object obj = in.readObject();
-
-        if (obj != null)
-            throw error("expected list at " + obj.getClass().getName() + " (" + obj + ")");
-        else
-            throw error("expected list at null");
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractMapDeserializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractMapDeserializer.java
deleted file mode 100644
index d8543d21fe..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractMapDeserializer.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.util.HashMap;
-
-/**
- * Serializing an object for known object types.
- */
-public class AbstractMapDeserializer extends AbstractDeserializer {
-
-    @Override
-    public Class getType() {
-        return HashMap.class;
-    }
-
-    @Override
-    public Object readObject(AbstractHessianInput in)
-            throws IOException {
-        Object obj = in.readObject();
-
-        if (obj != null)
-            throw error("expected map/object at " + obj.getClass().getName() + " (" + obj + ")");
-        else
-            throw error("expected map/object at null");
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractSerializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractSerializer.java
deleted file mode 100644
index 088cf256c0..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractSerializer.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.util.logging.Logger;
-
-/**
- * Serializing an object.
- */
-abstract public class AbstractSerializer implements Serializer {
-    protected static final Logger log
-            = Logger.getLogger(AbstractSerializer.class.getName());
-
-    @Override
-    abstract public void writeObject(Object obj, AbstractHessianOutput out)
-            throws IOException;
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractSerializerFactory.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractSerializerFactory.java
deleted file mode 100644
index 6621543c9c..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/AbstractSerializerFactory.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-/**
- * Factory for returning serialization methods.
- */
-abstract public class AbstractSerializerFactory {
-    /**
-     * Returns the serializer for a class.
-     *
-     * @param cl the class of the object that needs to be serialized.
-     * @return a serializer object for the serialization.
-     */
-    abstract public Serializer getSerializer(Class cl)
-            throws HessianProtocolException;
-
-    /**
-     * Returns the deserializer for a class.
-     *
-     * @param cl the class of the object that needs to be deserialized.
-     * @return a deserializer object for the serialization.
-     */
-    abstract public Deserializer getDeserializer(Class cl)
-            throws HessianProtocolException;
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/ArrayDeserializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/ArrayDeserializer.java
deleted file mode 100644
index e575411ba8..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/ArrayDeserializer.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.lang.reflect.Array;
-import java.util.ArrayList;
-
-/**
- * Deserializing a Java array
- */
-public class ArrayDeserializer extends AbstractListDeserializer {
-    private Class _componentType;
-    private Class _type;
-
-    public ArrayDeserializer(Class componentType) {
-        _componentType = componentType;
-
-        if (_componentType != null) {
-            try {
-                _type = Array.newInstance(_componentType, 0).getClass();
-            } catch (Exception e) {
-            }
-        }
-
-        if (_type == null)
-            _type = Object[].class;
-    }
-
-    @Override
-    public Class getType() {
-        return _type;
-    }
-
-    /**
-     * Reads the array.
-     */
-    @Override
-    public Object readList(AbstractHessianInput in, int length)
-            throws IOException {
-        if (length >= 0) {
-            Object[] data = createArray(length);
-
-            in.addRef(data);
-
-            if (_componentType != null) {
-                for (int i = 0; i < data.length; i++)
-                    data[i] = in.readObject(_componentType);
-            } else {
-                for (int i = 0; i < data.length; i++)
-                    data[i] = in.readObject();
-            }
-
-            in.readListEnd();
-
-            return data;
-        } else {
-            ArrayList list = new ArrayList();
-
-            in.addRef(list);
-
-            if (_componentType != null) {
-                while (!in.isEnd())
-                    list.add(in.readObject(_componentType));
-            } else {
-                while (!in.isEnd())
-                    list.add(in.readObject());
-            }
-
-            in.readListEnd();
-
-            Object[] data = createArray(list.size());
-            for (int i = 0; i < data.length; i++)
-                data[i] = list.get(i);
-
-            return data;
-        }
-    }
-
-    /**
-     * Reads the array.
-     */
-    @Override
-    public Object readLengthList(AbstractHessianInput in, int length)
-            throws IOException {
-        Object[] data = createArray(length);
-
-        in.addRef(data);
-
-        if (_componentType != null) {
-            for (int i = 0; i < data.length; i++)
-                data[i] = in.readObject(_componentType);
-        } else {
-            for (int i = 0; i < data.length; i++)
-                data[i] = in.readObject();
-        }
-
-        return data;
-    }
-
-    protected Object[] createArray(int length) {
-        if (_componentType != null)
-            return (Object[]) Array.newInstance(_componentType, length);
-        else
-            return new Object[length];
-    }
-
-    @Override
-    public String toString() {
-        return "ArrayDeserializer[" + _componentType + "]";
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/ArraySerializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/ArraySerializer.java
deleted file mode 100644
index d6cfcc5cb4..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/ArraySerializer.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-
-/**
- * Serializing a Java array.
- */
-public class ArraySerializer extends AbstractSerializer {
-    @Override
-    public void writeObject(Object obj, AbstractHessianOutput out)
-            throws IOException {
-        if (out.addRef(obj))
-            return;
-
-        Object[] array = (Object[]) obj;
-
-        boolean hasEnd = out.writeListBegin(array.length,
-                getArrayType(obj.getClass()));
-
-        for (int i = 0; i < array.length; i++)
-            out.writeObject(array[i]);
-
-        if (hasEnd)
-            out.writeListEnd();
-    }
-
-    /**
-     * Returns the &lt;type> name for a &lt;list>.
-     */
-    private String getArrayType(Class cl) {
-        if (cl.isArray())
-            return '[' + getArrayType(cl.getComponentType());
-
-        String name = cl.getName();
-
-        if (name.equals("java.lang.String"))
-            return "string";
-        else if (name.equals("java.lang.Object"))
-            return "object";
-        else if (name.equals("java.util.Date"))
-            return "date";
-        else
-            return name;
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/BasicDeserializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/BasicDeserializer.java
deleted file mode 100644
index 20c593f38b..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/BasicDeserializer.java
+++ /dev/null
@@ -1,607 +0,0 @@
-/*
- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Date;
-
-/**
- * Serializing an object for known object types.
- */
-public class BasicDeserializer extends AbstractDeserializer {
-    public static final int NULL = BasicSerializer.NULL;
-    public static final int BOOLEAN = BasicSerializer.BOOLEAN;
-    public static final int BYTE = BasicSerializer.BYTE;
-    public static final int SHORT = BasicSerializer.SHORT;
-    public static final int INTEGER = BasicSerializer.INTEGER;
-    public static final int LONG = BasicSerializer.LONG;
-    public static final int FLOAT = BasicSerializer.FLOAT;
-    public static final int DOUBLE = BasicSerializer.DOUBLE;
-    public static final int CHARACTER = BasicSerializer.CHARACTER;
-    public static final int CHARACTER_OBJECT = BasicSerializer.CHARACTER_OBJECT;
-    public static final int STRING = BasicSerializer.STRING;
-    public static final int DATE = BasicSerializer.DATE;
-    public static final int NUMBER = BasicSerializer.NUMBER;
-    public static final int OBJECT = BasicSerializer.OBJECT;
-
-    public static final int BOOLEAN_ARRAY = BasicSerializer.BOOLEAN_ARRAY;
-    public static final int BYTE_ARRAY = BasicSerializer.BYTE_ARRAY;
-    public static final int SHORT_ARRAY = BasicSerializer.SHORT_ARRAY;
-    public static final int INTEGER_ARRAY = BasicSerializer.INTEGER_ARRAY;
-    public static final int LONG_ARRAY = BasicSerializer.LONG_ARRAY;
-    public static final int FLOAT_ARRAY = BasicSerializer.FLOAT_ARRAY;
-    public static final int DOUBLE_ARRAY = BasicSerializer.DOUBLE_ARRAY;
-    public static final int CHARACTER_ARRAY = BasicSerializer.CHARACTER_ARRAY;
-    public static final int STRING_ARRAY = BasicSerializer.STRING_ARRAY;
-    public static final int OBJECT_ARRAY = BasicSerializer.OBJECT_ARRAY;
-
-    private int _code;
-
-    public BasicDeserializer(int code) {
-        _code = code;
-    }
-
-    @Override
-    public Class getType() {
-        switch (_code) {
-            case NULL:
-                return void.class;
-            case BOOLEAN:
-                return Boolean.class;
-            case BYTE:
-                return Byte.class;
-            case SHORT:
-                return Short.class;
-            case INTEGER:
-                return Integer.class;
-            case LONG:
-                return Long.class;
-            case FLOAT:
-                return Float.class;
-            case DOUBLE:
-                return Double.class;
-            case CHARACTER:
-                return Character.class;
-            case CHARACTER_OBJECT:
-                return Character.class;
-            case STRING:
-                return String.class;
-            case DATE:
-                return Date.class;
-            case NUMBER:
-                return Number.class;
-            case OBJECT:
-                return Object.class;
-
-            case BOOLEAN_ARRAY:
-                return boolean[].class;
-            case BYTE_ARRAY:
-                return byte[].class;
-            case SHORT_ARRAY:
-                return short[].class;
-            case INTEGER_ARRAY:
-                return int[].class;
-            case LONG_ARRAY:
-                return long[].class;
-            case FLOAT_ARRAY:
-                return float[].class;
-            case DOUBLE_ARRAY:
-                return double[].class;
-            case CHARACTER_ARRAY:
-                return char[].class;
-            case STRING_ARRAY:
-                return String[].class;
-            case OBJECT_ARRAY:
-                return Object[].class;
-            default:
-                throw new UnsupportedOperationException();
-        }
-    }
-
-    @Override
-    public Object readObject(AbstractHessianInput in)
-            throws IOException {
-        switch (_code) {
-            case NULL:
-                // hessian/3490
-                in.readObject();
-
-                return null;
-
-            case BOOLEAN:
-                return Boolean.valueOf(in.readBoolean());
-
-            case BYTE:
-                return Byte.valueOf((byte) in.readInt());
-
-            case SHORT:
-                return Short.valueOf((short) in.readInt());
-
-            case INTEGER:
-                return Integer.valueOf(in.readInt());
-
-            case LONG:
-                return Long.valueOf(in.readLong());
-
-            case FLOAT:
-                return Float.valueOf((float) in.readDouble());
-
-            case DOUBLE:
-                return Double.valueOf(in.readDouble());
-
-            case STRING:
-                return in.readString();
-
-            case OBJECT:
-                return in.readObject();
-
-            case CHARACTER: {
-                String s = in.readString();
-                if (s == null || s.equals(""))
-                    return Character.valueOf((char) 0);
-                else
-                    return Character.valueOf(s.charAt(0));
-            }
-
-            case CHARACTER_OBJECT: {
-                String s = in.readString();
-                if (s == null || s.equals(""))
-                    return null;
-                else
-                    return Character.valueOf(s.charAt(0));
-            }
-
-            case DATE:
-                return new Date(in.readUTCDate());
-
-            case NUMBER:
-                return in.readObject();
-
-            case BYTE_ARRAY:
-                return in.readBytes();
-
-            case CHARACTER_ARRAY: {
-                String s = in.readString();
-
-                if (s == null)
-                    return null;
-                else {
-                    int len = s.length();
-                    char[] chars = new char[len];
-                    s.getChars(0, len, chars, 0);
-                    return chars;
-                }
-            }
-
-            case BOOLEAN_ARRAY:
-            case SHORT_ARRAY:
-            case INTEGER_ARRAY:
-            case LONG_ARRAY:
-            case FLOAT_ARRAY:
-            case DOUBLE_ARRAY:
-            case STRING_ARRAY: {
-                int code = in.readListStart();
-
-                switch (code) {
-                    case 'N':
-                        return null;
-
-                    case 0x10:
-                    case 0x11:
-                    case 0x12:
-                    case 0x13:
-                    case 0x14:
-                    case 0x15:
-                    case 0x16:
-                    case 0x17:
-                    case 0x18:
-                    case 0x19:
-                    case 0x1a:
-                    case 0x1b:
-                    case 0x1c:
-                    case 0x1d:
-                    case 0x1e:
-                    case 0x1f:
-                        int length = code - 0x10;
-                        in.readInt();
-
-                        return readLengthList(in, length);
-
-                    default:
-                        String type = in.readType();
-                        length = in.readLength();
-
-                        return readList(in, length);
-                }
-            }
-
-            default:
-                throw new UnsupportedOperationException();
-        }
-    }
-
-    @Override
-    public Object readList(AbstractHessianInput in, int length)
-            throws IOException {
-        switch (_code) {
-            case BOOLEAN_ARRAY: {
-                if (length >= 0) {
-                    boolean[] data = new boolean[length];
-
-                    in.addRef(data);
-
-                    for (int i = 0; i < data.length; i++)
-                        data[i] = in.readBoolean();
-
-                    in.readEnd();
-
-                    return data;
-                } else {
-                    ArrayList list = new ArrayList();
-
-                    while (!in.isEnd())
-                        list.add(Boolean.valueOf(in.readBoolean()));
-
-                    in.readEnd();
-
-                    boolean[] data = new boolean[list.size()];
-
-                    in.addRef(data);
-
-                    for (int i = 0; i < data.length; i++)
-                        data[i] = ((Boolean) list.get(i)).booleanValue();
-
-                    return data;
-                }
-            }
-
-            case SHORT_ARRAY: {
-                if (length >= 0) {
-                    short[] data = new short[length];
-
-                    in.addRef(data);
-
-                    for (int i = 0; i < data.length; i++)
-                        data[i] = (short) in.readInt();
-
-                    in.readEnd();
-
-                    return data;
-                } else {
-                    ArrayList list = new ArrayList();
-
-                    while (!in.isEnd())
-                        list.add(Short.valueOf((short) in.readInt()));
-
-                    in.readEnd();
-
-                    short[] data = new short[list.size()];
-                    for (int i = 0; i < data.length; i++)
-                        data[i] = ((Short) list.get(i)).shortValue();
-
-                    in.addRef(data);
-
-                    return data;
-                }
-            }
-
-            case INTEGER_ARRAY: {
-                if (length >= 0) {
-                    int[] data = new int[length];
-
-                    in.addRef(data);
-
-                    for (int i = 0; i < data.length; i++)
-                        data[i] = in.readInt();
-
-                    in.readEnd();
-
-                    return data;
-                } else {
-                    ArrayList list = new ArrayList();
-
-                    while (!in.isEnd())
-                        list.add(Integer.valueOf(in.readInt()));
-
-
-                    in.readEnd();
-
-                    int[] data = new int[list.size()];
-                    for (int i = 0; i < data.length; i++)
-                        data[i] = ((Integer) list.get(i)).intValue();
-
-                    in.addRef(data);
-
-                    return data;
-                }
-            }
-
-            case LONG_ARRAY: {
-                if (length >= 0) {
-                    long[] data = new long[length];
-
-                    in.addRef(data);
-
-                    for (int i = 0; i < data.length; i++)
-                        data[i] = in.readLong();
-
-                    in.readEnd();
-
-                    return data;
-                } else {
-                    ArrayList list = new ArrayList();
-
-                    while (!in.isEnd())
-                        list.add(Long.valueOf(in.readLong()));
-
-                    in.readEnd();
-
-                    long[] data = new long[list.size()];
-                    for (int i = 0; i < data.length; i++)
-                        data[i] = ((Long) list.get(i)).longValue();
-
-                    in.addRef(data);
-
-                    return data;
-                }
-            }
-
-            case FLOAT_ARRAY: {
-                if (length >= 0) {
-                    float[] data = new float[length];
-                    in.addRef(data);
-
-                    for (int i = 0; i < data.length; i++)
-                        data[i] = (float) in.readDouble();
-
-                    in.readEnd();
-
-                    return data;
-                } else {
-                    ArrayList list = new ArrayList();
-
-                    while (!in.isEnd())
-                        list.add(new Float(in.readDouble()));
-
-                    in.readEnd();
-
-                    float[] data = new float[list.size()];
-                    for (int i = 0; i < data.length; i++)
-                        data[i] = ((Float) list.get(i)).floatValue();
-
-                    in.addRef(data);
-
-                    return data;
-                }
-            }
-
-            case DOUBLE_ARRAY: {
-                if (length >= 0) {
-                    double[] data = new double[length];
-                    in.addRef(data);
-
-                    for (int i = 0; i < data.length; i++)
-                        data[i] = in.readDouble();
-
-                    in.readEnd();
-
-                    return data;
-                } else {
-                    ArrayList list = new ArrayList();
-
-                    while (!in.isEnd())
-                        list.add(new Double(in.readDouble()));
-
-                    in.readEnd();
-
-                    double[] data = new double[list.size()];
-                    in.addRef(data);
-                    for (int i = 0; i < data.length; i++)
-                        data[i] = ((Double) list.get(i)).doubleValue();
-
-                    return data;
-                }
-            }
-
-            case STRING_ARRAY: {
-                if (length >= 0) {
-                    String[] data = new String[length];
-                    in.addRef(data);
-
-                    for (int i = 0; i < data.length; i++)
-                        data[i] = in.readString();
-
-                    in.readEnd();
-
-                    return data;
-                } else {
-                    ArrayList list = new ArrayList();
-
-                    while (!in.isEnd())
-                        list.add(in.readString());
-
-                    in.readEnd();
-
-                    String[] data = new String[list.size()];
-                    in.addRef(data);
-                    for (int i = 0; i < data.length; i++)
-                        data[i] = (String) list.get(i);
-
-                    return data;
-                }
-            }
-
-            case OBJECT_ARRAY: {
-                if (length >= 0) {
-                    Object[] data = new Object[length];
-                    in.addRef(data);
-
-                    for (int i = 0; i < data.length; i++)
-                        data[i] = in.readObject();
-
-                    in.readEnd();
-
-                    return data;
-                } else {
-                    ArrayList list = new ArrayList();
-
-                    in.addRef(list); // XXX: potential issues here
-
-                    while (!in.isEnd())
-                        list.add(in.readObject());
-
-                    in.readEnd();
-
-                    Object[] data = new Object[list.size()];
-                    for (int i = 0; i < data.length; i++)
-                        data[i] = (Object) list.get(i);
-
-                    return data;
-                }
-            }
-
-            default:
-                throw new UnsupportedOperationException(String.valueOf(this));
-        }
-    }
-
-    @Override
-    public Object readLengthList(AbstractHessianInput in, int length)
-            throws IOException {
-        switch (_code) {
-            case BOOLEAN_ARRAY: {
-                boolean[] data = new boolean[length];
-
-                in.addRef(data);
-
-                for (int i = 0; i < data.length; i++)
-                    data[i] = in.readBoolean();
-
-                return data;
-            }
-
-            case SHORT_ARRAY: {
-                short[] data = new short[length];
-
-                in.addRef(data);
-
-                for (int i = 0; i < data.length; i++)
-                    data[i] = (short) in.readInt();
-
-                return data;
-            }
-
-            case INTEGER_ARRAY: {
-                int[] data = new int[length];
-
-                in.addRef(data);
-
-                for (int i = 0; i < data.length; i++)
-                    data[i] = in.readInt();
-
-                return data;
-            }
-
-            case LONG_ARRAY: {
-                long[] data = new long[length];
-
-                in.addRef(data);
-
-                for (int i = 0; i < data.length; i++)
-                    data[i] = in.readLong();
-
-                return data;
-            }
-
-            case FLOAT_ARRAY: {
-                float[] data = new float[length];
-                in.addRef(data);
-
-                for (int i = 0; i < data.length; i++)
-                    data[i] = (float) in.readDouble();
-
-                return data;
-            }
-
-            case DOUBLE_ARRAY: {
-                double[] data = new double[length];
-                in.addRef(data);
-
-                for (int i = 0; i < data.length; i++)
-                    data[i] = in.readDouble();
-
-                return data;
-            }
-
-            case STRING_ARRAY: {
-                String[] data = new String[length];
-                in.addRef(data);
-
-                for (int i = 0; i < data.length; i++)
-                    data[i] = in.readString();
-
-                return data;
-            }
-
-            case OBJECT_ARRAY: {
-                Object[] data = new Object[length];
-                in.addRef(data);
-
-                for (int i = 0; i < data.length; i++)
-                    data[i] = in.readObject();
-
-                return data;
-            }
-
-            default:
-                throw new UnsupportedOperationException(String.valueOf(this));
-        }
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/BasicSerializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/BasicSerializer.java
deleted file mode 100644
index 6d5aee9f30..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/BasicSerializer.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.util.Date;
-
-/**
- * Serializing an object for known object types.
- */
-public class BasicSerializer extends AbstractSerializer {
-    public static final int NULL = 0;
-    public static final int BOOLEAN = NULL + 1;
-    public static final int BYTE = BOOLEAN + 1;
-    public static final int SHORT = BYTE + 1;
-    public static final int INTEGER = SHORT + 1;
-    public static final int LONG = INTEGER + 1;
-    public static final int FLOAT = LONG + 1;
-    public static final int DOUBLE = FLOAT + 1;
-    public static final int CHARACTER = DOUBLE + 1;
-    public static final int CHARACTER_OBJECT = CHARACTER + 1;
-    public static final int STRING = CHARACTER_OBJECT + 1;
-    public static final int DATE = STRING + 1;
-    public static final int NUMBER = DATE + 1;
-    public static final int OBJECT = NUMBER + 1;
-
-    public static final int BOOLEAN_ARRAY = OBJECT + 1;
-    public static final int BYTE_ARRAY = BOOLEAN_ARRAY + 1;
-    public static final int SHORT_ARRAY = BYTE_ARRAY + 1;
-    public static final int INTEGER_ARRAY = SHORT_ARRAY + 1;
-    public static final int LONG_ARRAY = INTEGER_ARRAY + 1;
-    public static final int FLOAT_ARRAY = LONG_ARRAY + 1;
-    public static final int DOUBLE_ARRAY = FLOAT_ARRAY + 1;
-    public static final int CHARACTER_ARRAY = DOUBLE_ARRAY + 1;
-    public static final int STRING_ARRAY = CHARACTER_ARRAY + 1;
-    public static final int OBJECT_ARRAY = STRING_ARRAY + 1;
-
-    private int code;
-
-    public BasicSerializer(int code) {
-        this.code = code;
-    }
-
-    @Override
-    public void writeObject(Object obj, AbstractHessianOutput out)
-            throws IOException {
-        switch (code) {
-            case BOOLEAN:
-                out.writeBoolean(((Boolean) obj).booleanValue());
-                break;
-
-            case BYTE:
-            case SHORT:
-            case INTEGER:
-                out.writeInt(((Number) obj).intValue());
-                break;
-
-            case LONG:
-                out.writeLong(((Number) obj).longValue());
-                break;
-
-            case FLOAT:
-            case DOUBLE:
-                out.writeDouble(((Number) obj).doubleValue());
-                break;
-
-            case CHARACTER:
-            case CHARACTER_OBJECT:
-                out.writeString(String.valueOf(obj));
-                break;
-
-            case STRING:
-                out.writeString((String) obj);
-                break;
-
-            case DATE:
-                out.writeUTCDate(((Date) obj).getTime());
-                break;
-
-            case BOOLEAN_ARRAY: {
-                if (out.addRef(obj))
-                    return;
-
-                boolean[] data = (boolean[]) obj;
-                boolean hasEnd = out.writeListBegin(data.length, "[boolean");
-                for (int i = 0; i < data.length; i++)
-                    out.writeBoolean(data[i]);
-
-                if (hasEnd)
-                    out.writeListEnd();
-
-                break;
-            }
-
-            case BYTE_ARRAY: {
-                byte[] data = (byte[]) obj;
-                out.writeBytes(data, 0, data.length);
-                break;
-            }
-
-            case SHORT_ARRAY: {
-                if (out.addRef(obj))
-                    return;
-
-                short[] data = (short[]) obj;
-                boolean hasEnd = out.writeListBegin(data.length, "[short");
-
-                for (int i = 0; i < data.length; i++)
-                    out.writeInt(data[i]);
-
-                if (hasEnd)
-                    out.writeListEnd();
-                break;
-            }
-
-            case INTEGER_ARRAY: {
-                if (out.addRef(obj))
-                    return;
-
-                int[] data = (int[]) obj;
-
-                boolean hasEnd = out.writeListBegin(data.length, "[int");
-
-                for (int i = 0; i < data.length; i++)
-                    out.writeInt(data[i]);
-
-                if (hasEnd)
-                    out.writeListEnd();
-
-                break;
-            }
-
-            case LONG_ARRAY: {
-                if (out.addRef(obj))
-                    return;
-
-                long[] data = (long[]) obj;
-
-                boolean hasEnd = out.writeListBegin(data.length, "[long");
-
-                for (int i = 0; i < data.length; i++)
-                    out.writeLong(data[i]);
-
-                if (hasEnd)
-                    out.writeListEnd();
-                break;
-            }
-
-            case FLOAT_ARRAY: {
-                if (out.addRef(obj))
-                    return;
-
-                float[] data = (float[]) obj;
-
-                boolean hasEnd = out.writeListBegin(data.length, "[float");
-
-                for (int i = 0; i < data.length; i++)
-                    out.writeDouble(data[i]);
-
-                if (hasEnd)
-                    out.writeListEnd();
-                break;
-            }
-
-            case DOUBLE_ARRAY: {
-                if (out.addRef(obj))
-                    return;
-
-                double[] data = (double[]) obj;
-                boolean hasEnd = out.writeListBegin(data.length, "[double");
-
-                for (int i = 0; i < data.length; i++)
-                    out.writeDouble(data[i]);
-
-                if (hasEnd)
-                    out.writeListEnd();
-                break;
-            }
-
-            case STRING_ARRAY: {
-                if (out.addRef(obj))
-                    return;
-
-                String[] data = (String[]) obj;
-
-                boolean hasEnd = out.writeListBegin(data.length, "[string");
-
-                for (int i = 0; i < data.length; i++) {
-                    out.writeString(data[i]);
-                }
-
-                if (hasEnd)
-                    out.writeListEnd();
-                break;
-            }
-
-            case CHARACTER_ARRAY: {
-                char[] data = (char[]) obj;
-                out.writeString(data, 0, data.length);
-                break;
-            }
-
-            case OBJECT_ARRAY: {
-                if (out.addRef(obj))
-                    return;
-
-                Object[] data = (Object[]) obj;
-
-                boolean hasEnd = out.writeListBegin(data.length, "[object");
-
-                for (int i = 0; i < data.length; i++) {
-                    out.writeObject(data[i]);
-                }
-
-                if (hasEnd)
-                    out.writeListEnd();
-                break;
-            }
-
-            case NULL:
-                out.writeNull();
-                break;
-
-            default:
-                throw new RuntimeException(code + " " + String.valueOf(obj.getClass()));
-        }
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/BeanDeserializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/BeanDeserializer.java
deleted file mode 100644
index a0f16c81ca..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/BeanDeserializer.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.HashMap;
-
-/**
- * Serializing an object for known object types.
- */
-public class BeanDeserializer extends AbstractMapDeserializer {
-    private Class _type;
-    private HashMap _methodMap;
-    private Method _readResolve;
-    private Constructor _constructor;
-    private Object[] _constructorArgs;
-
-    public BeanDeserializer(Class cl) {
-        _type = cl;
-        _methodMap = getMethodMap(cl);
-
-        _readResolve = getReadResolve(cl);
-
-        Constructor[] constructors = cl.getConstructors();
-        int bestLength = Integer.MAX_VALUE;
-
-        for (int i = 0; i < constructors.length; i++) {
-            if (constructors[i].getParameterTypes().length < bestLength) {
-                _constructor = constructors[i];
-                bestLength = _constructor.getParameterTypes().length;
-            }
-        }
-
-        if (_constructor != null) {
-            _constructor.setAccessible(true);
-            Class[] params = _constructor.getParameterTypes();
-            _constructorArgs = new Object[params.length];
-            for (int i = 0; i < params.length; i++) {
-                _constructorArgs[i] = getParamArg(params[i]);
-            }
-        }
-    }
-
-    /**
-     * Creates a map of the classes fields.
-     */
-    protected static Object getParamArg(Class cl) {
-        if (!cl.isPrimitive())
-            return null;
-        else if (boolean.class.equals(cl))
-            return Boolean.FALSE;
-        else if (byte.class.equals(cl))
-            return Byte.valueOf((byte) 0);
-        else if (short.class.equals(cl))
-            return Short.valueOf((short) 0);
-        else if (char.class.equals(cl))
-            return Character.valueOf((char) 0);
-        else if (int.class.equals(cl))
-            return Integer.valueOf(0);
-        else if (long.class.equals(cl))
-            return Long.valueOf(0);
-        else if (float.class.equals(cl))
-            return Double.valueOf(0);
-        else if (double.class.equals(cl))
-            return Double.valueOf(0);
-        else
-            throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public Class getType() {
-        return _type;
-    }
-
-    @Override
-    public Object readMap(AbstractHessianInput in)
-            throws IOException {
-        try {
-            Object obj = instantiate();
-
-            return readMap(in, obj);
-        } catch (IOException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new IOExceptionWrapper(e);
-        }
-    }
-
-    public Object readMap(AbstractHessianInput in, Object obj)
-            throws IOException {
-        try {
-            int ref = in.addRef(obj);
-
-            while (!in.isEnd()) {
-                Object key = in.readObject();
-
-                Method method = (Method) _methodMap.get(key);
-
-                if (method != null) {
-                    Object value = in.readObject(method.getParameterTypes()[0]);
-
-                    method.invoke(obj, new Object[]{value});
-                } else {
-                    Object value = in.readObject();
-                }
-            }
-
-            in.readMapEnd();
-
-            Object resolve = resolve(obj);
-
-            if (obj != resolve)
-                in.setRef(ref, resolve);
-
-            return resolve;
-        } catch (IOException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new IOExceptionWrapper(e);
-        }
-    }
-
-    private Object resolve(Object obj) {
-        // if there's a readResolve method, call it
-        try {
-            if (_readResolve != null)
-                return _readResolve.invoke(obj, new Object[0]);
-        } catch (Exception e) {
-        }
-
-        return obj;
-    }
-
-    protected Object instantiate()
-            throws Exception {
-        return _constructor.newInstance(_constructorArgs);
-    }
-
-    /**
-     * Returns the readResolve method
-     */
-    protected Method getReadResolve(Class cl) {
-        for (; cl != null; cl = cl.getSuperclass()) {
-            Method[] methods = cl.getDeclaredMethods();
-
-            for (int i = 0; i < methods.length; i++) {
-                Method method = methods[i];
-
-                if (method.getName().equals("readResolve") &&
-                        method.getParameterTypes().length == 0)
-                    return method;
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Creates a map of the classes fields.
-     */
-    protected HashMap getMethodMap(Class cl) {
-        HashMap methodMap = new HashMap();
-
-        for (; cl != null; cl = cl.getSuperclass()) {
-            Method[] methods = cl.getDeclaredMethods();
-
-            for (int i = 0; i < methods.length; i++) {
-                Method method = methods[i];
-
-                if (Modifier.isStatic(method.getModifiers()))
-                    continue;
-
-                String name = method.getName();
-
-                if (!name.startsWith("set"))
-                    continue;
-
-                Class[] paramTypes = method.getParameterTypes();
-                if (paramTypes.length != 1)
-                    continue;
-
-                if (!method.getReturnType().equals(void.class))
-                    continue;
-
-                if (findGetter(methods, name, paramTypes[0]) == null)
-                    continue;
-
-                // XXX: could parameterize the handler to only deal with public
-                try {
-                    method.setAccessible(true);
-                } catch (Throwable e) {
-                    e.printStackTrace();
-                }
-
-                name = name.substring(3);
-
-                int j = 0;
-                for (; j < name.length() && Character.isUpperCase(name.charAt(j)); j++) {
-                }
-
-                if (j == 1)
-                    name = name.substring(0, j).toLowerCase() + name.substring(j);
-                else if (j > 1)
-                    name = name.substring(0, j - 1).toLowerCase() + name.substring(j - 1);
-
-
-                methodMap.put(name, method);
-            }
-        }
-
-        return methodMap;
-    }
-
-    /**
-     * Finds any matching setter.
-     */
-    private Method findGetter(Method[] methods, String setterName, Class arg) {
-        String getterName = "get" + setterName.substring(3);
-
-        for (int i = 0; i < methods.length; i++) {
-            Method method = methods[i];
-
-            if (!method.getName().equals(getterName))
-                continue;
-
-            if (!method.getReturnType().equals(arg))
-                continue;
-
-            Class[] params = method.getParameterTypes();
-
-            if (params.length == 0)
-                return method;
-        }
-
-        return null;
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/BeanSerializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/BeanSerializer.java
deleted file mode 100644
index a3a8ba5f22..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/BeanSerializer.java
+++ /dev/null
@@ -1,310 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Serializing an object for known object types.
- */
-public class BeanSerializer extends AbstractSerializer {
-    private static final Logger log
-            = Logger.getLogger(BeanSerializer.class.getName());
-
-    private static final Object[] NULL_ARGS = new Object[0];
-    private Method[] _methods;
-    private String[] _names;
-
-    private Object _writeReplaceFactory;
-    private Method _writeReplace;
-
-    public BeanSerializer(Class cl, ClassLoader loader) {
-        introspectWriteReplace(cl, loader);
-
-        ArrayList primitiveMethods = new ArrayList();
-        ArrayList compoundMethods = new ArrayList();
-
-        for (; cl != null; cl = cl.getSuperclass()) {
-            Method[] methods = cl.getDeclaredMethods();
-
-            for (int i = 0; i < methods.length; i++) {
-                Method method = methods[i];
-
-                if (Modifier.isStatic(method.getModifiers()))
-                    continue;
-
-                if (method.getParameterTypes().length != 0)
-                    continue;
-
-                String name = method.getName();
-
-                if (!name.startsWith("get"))
-                    continue;
-
-                Class type = method.getReturnType();
-
-                if (type.equals(void.class))
-                    continue;
-
-                if (findSetter(methods, name, type) == null)
-                    continue;
-
-                // XXX: could parameterize the handler to only deal with public
-                method.setAccessible(true);
-
-                if (type.isPrimitive()
-                        || type.getName().startsWith("java.lang.")
-                        && !type.equals(Object.class))
-                    primitiveMethods.add(method);
-                else
-                    compoundMethods.add(method);
-            }
-        }
-
-        ArrayList methodList = new ArrayList();
-        methodList.addAll(primitiveMethods);
-        methodList.addAll(compoundMethods);
-
-        Collections.sort(methodList, new MethodNameCmp());
-
-        _methods = new Method[methodList.size()];
-        methodList.toArray(_methods);
-
-        _names = new String[_methods.length];
-
-        for (int i = 0; i < _methods.length; i++) {
-            String name = _methods[i].getName();
-
-            name = name.substring(3);
-
-            int j = 0;
-            for (; j < name.length() && Character.isUpperCase(name.charAt(j)); j++) {
-            }
-
-            if (j == 1)
-                name = name.substring(0, j).toLowerCase() + name.substring(j);
-            else if (j > 1)
-                name = name.substring(0, j - 1).toLowerCase() + name.substring(j - 1);
-
-            _names[i] = name;
-        }
-    }
-
-    private void introspectWriteReplace(Class cl, ClassLoader loader) {
-        try {
-            String className = cl.getName() + "HessianSerializer";
-
-            Class serializerClass = Class.forName(className, false, loader);
-
-            Object serializerObject = serializerClass.newInstance();
-
-            Method writeReplace = getWriteReplace(serializerClass, cl);
-
-            if (writeReplace != null) {
-                _writeReplaceFactory = serializerObject;
-                _writeReplace = writeReplace;
-
-                return;
-            }
-        } catch (ClassNotFoundException e) {
-        } catch (Exception e) {
-            log.log(Level.FINER, e.toString(), e);
-        }
-
-        _writeReplace = getWriteReplace(cl);
-    }
-
-    /**
-     * Returns the writeReplace method
-     */
-    protected Method getWriteReplace(Class cl) {
-        for (; cl != null; cl = cl.getSuperclass()) {
-            Method[] methods = cl.getDeclaredMethods();
-
-            for (int i = 0; i < methods.length; i++) {
-                Method method = methods[i];
-
-                if (method.getName().equals("writeReplace") &&
-                        method.getParameterTypes().length == 0)
-                    return method;
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Returns the writeReplace method
-     */
-    protected Method getWriteReplace(Class cl, Class param) {
-        for (; cl != null; cl = cl.getSuperclass()) {
-            for (Method method : cl.getDeclaredMethods()) {
-                if (method.getName().equals("writeReplace")
-                        && method.getParameterTypes().length == 1
-                        && param.equals(method.getParameterTypes()[0]))
-                    return method;
-            }
-        }
-
-        return null;
-    }
-
-    @Override
-    public void writeObject(Object obj, AbstractHessianOutput out)
-            throws IOException {
-        if (out.addRef(obj))
-            return;
-
-        Class cl = obj.getClass();
-
-        try {
-            if (_writeReplace != null) {
-                Object repl;
-
-                if (_writeReplaceFactory != null)
-                    repl = _writeReplace.invoke(_writeReplaceFactory, obj);
-                else
-                    repl = _writeReplace.invoke(obj);
-
-                out.removeRef(obj);
-
-                out.writeObject(repl);
-
-                out.replaceRef(repl, obj);
-
-                return;
-            }
-        } catch (Exception e) {
-            log.log(Level.FINER, e.toString(), e);
-        }
-
-        int ref = out.writeObjectBegin(cl.getName());
-
-        if (ref < -1) {
-            // Hessian 1.1 uses a map
-
-            for (int i = 0; i < _methods.length; i++) {
-                Method method = _methods[i];
-                Object value = null;
-
-                try {
-                    value = _methods[i].invoke(obj, (Object[]) null);
-                } catch (Exception e) {
-                    log.log(Level.FINE, e.toString(), e);
-                }
-
-                out.writeString(_names[i]);
-
-                out.writeObject(value);
-            }
-
-            out.writeMapEnd();
-        } else {
-            if (ref == -1) {
-                out.writeInt(_names.length);
-
-                for (int i = 0; i < _names.length; i++)
-                    out.writeString(_names[i]);
-
-                out.writeObjectBegin(cl.getName());
-            }
-
-            for (int i = 0; i < _methods.length; i++) {
-                Method method = _methods[i];
-                Object value = null;
-
-                try {
-                    value = _methods[i].invoke(obj, (Object[]) null);
-                } catch (Exception e) {
-                    log.log(Level.FINER, e.toString(), e);
-                }
-
-                out.writeObject(value);
-            }
-        }
-    }
-
-    /**
-     * Finds any matching setter.
-     */
-    private Method findSetter(Method[] methods, String getterName, Class arg) {
-        String setterName = "set" + getterName.substring(3);
-
-        for (int i = 0; i < methods.length; i++) {
-            Method method = methods[i];
-
-            if (!method.getName().equals(setterName))
-                continue;
-
-            if (!method.getReturnType().equals(void.class))
-                continue;
-
-            Class[] params = method.getParameterTypes();
-
-            if (params.length == 1 && params[0].equals(arg))
-                return method;
-        }
-
-        return null;
-    }
-
-    static class MethodNameCmp implements Comparator<Method> {
-        @Override
-        public int compare(Method a, Method b) {
-            return a.getName().compareTo(b.getName());
-        }
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/BeanSerializerFactory.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/BeanSerializerFactory.java
deleted file mode 100644
index 7c8e328a48..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/BeanSerializerFactory.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-/**
- * Factory for returning serialization methods.
- */
-public class BeanSerializerFactory extends SerializerFactory {
-    /**
-     * Returns the default serializer for a class that isn't matched
-     * directly.  Application can override this method to produce
-     * bean-style serialization instead of field serialization.
-     *
-     * @param cl the class of the object that needs to be serialized.
-     * @return a serializer object for the serialization.
-     */
-    @Override
-    protected Serializer getDefaultSerializer(Class cl) {
-        return new BeanSerializer(cl, getClassLoader());
-    }
-
-    /**
-     * Returns the default deserializer for a class that isn't matched
-     * directly.  Application can override this method to produce
-     * bean-style serialization instead of field serialization.
-     *
-     * @param cl the class of the object that needs to be serialized.
-     * @return a serializer object for the serialization.
-     */
-    @Override
-    protected Deserializer getDefaultDeserializer(Class cl) {
-        return new BeanDeserializer(cl);
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/BigIntegerDeserializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/BigIntegerDeserializer.java
deleted file mode 100644
index 5cd0498db0..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/BigIntegerDeserializer.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.math.BigInteger;
-
-public class BigIntegerDeserializer extends JavaDeserializer {
-
-    public BigIntegerDeserializer() {
-        super(BigInteger.class);
-    }
-
-    @Override
-    protected Object instantiate() throws Exception {
-        return new BigInteger("0");
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/CalendarHandle.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/CalendarHandle.java
deleted file mode 100644
index ccb90b21e5..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/CalendarHandle.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-
-/**
- * Handle for a calendar object.
- */
-public class CalendarHandle implements java.io.Serializable, HessianHandle {
-    private Class type;
-    private Date date;
-
-    public CalendarHandle() {
-    }
-
-    public CalendarHandle(Class type, long time) {
-        if (!GregorianCalendar.class.equals(type))
-            this.type = type;
-
-        this.date = new Date(time);
-    }
-
-    private Object readResolve() {
-        try {
-            Calendar cal;
-
-            if (this.type != null)
-                cal = (Calendar) this.type.newInstance();
-            else
-                cal = new GregorianCalendar();
-
-            cal.setTimeInMillis(this.date.getTime());
-
-            return cal;
-        } catch (RuntimeException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/CalendarSerializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/CalendarSerializer.java
deleted file mode 100644
index 0db6c14891..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/CalendarSerializer.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.util.Calendar;
-
-/**
- * Serializing a calendar.
- */
-public class CalendarSerializer extends AbstractSerializer {
-    private static CalendarSerializer SERIALIZER = new CalendarSerializer();
-
-    public static CalendarSerializer create() {
-        return SERIALIZER;
-    }
-
-    @Override
-    public void writeObject(Object obj, AbstractHessianOutput out)
-            throws IOException {
-        if (obj == null)
-            out.writeNull();
-        else {
-            Calendar cal = (Calendar) obj;
-
-            out.writeObject(new CalendarHandle(cal.getClass(),
-                    cal.getTimeInMillis()));
-        }
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/ClassDeserializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/ClassDeserializer.java
deleted file mode 100644
index 422333c6a3..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/ClassDeserializer.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.util.HashMap;
-
-/**
- * Deserializing a JDK 1.2 Class.
- */
-public class ClassDeserializer extends AbstractMapDeserializer {
-    private static final HashMap<String, Class> _primClasses
-            = new HashMap<String, Class>();
-
-    static {
-        _primClasses.put("void", void.class);
-        _primClasses.put("boolean", boolean.class);
-        _primClasses.put("java.lang.Boolean", Boolean.class);
-        _primClasses.put("byte", byte.class);
-        _primClasses.put("java.lang.Byte", Byte.class);
-        _primClasses.put("char", char.class);
-        _primClasses.put("java.lang.Character", Character.class);
-        _primClasses.put("short", short.class);
-        _primClasses.put("java.lang.Short", Short.class);
-        _primClasses.put("int", int.class);
-        _primClasses.put("java.lang.Integer", Integer.class);
-        _primClasses.put("long", long.class);
-        _primClasses.put("java.lang.Long", Long.class);
-        _primClasses.put("float", float.class);
-        _primClasses.put("java.lang.Float", Float.class);
-        _primClasses.put("double", double.class);
-        _primClasses.put("java.lang.Double", Double.class);
-        _primClasses.put("java.lang.String", String.class);
-    }
-
-    private ClassLoader _loader;
-
-    public ClassDeserializer(ClassLoader loader) {
-        _loader = loader;
-    }
-
-    @Override
-    public Class getType() {
-        return Class.class;
-    }
-
-    @Override
-    public Object readMap(AbstractHessianInput in)
-            throws IOException {
-        int ref = in.addRef(null);
-
-        String name = null;
-
-        while (!in.isEnd()) {
-            String key = in.readString();
-
-            if (key.equals("name"))
-                name = in.readString();
-            else
-                in.readObject();
-        }
-
-        in.readMapEnd();
-
-        Object value = create(name);
-
-        in.setRef(ref, value);
-
-        return value;
-    }
-
-    @Override
-    public Object readObject(AbstractHessianInput in, String[] fieldNames)
-            throws IOException {
-        int ref = in.addRef(null);
-
-        String name = null;
-
-        for (int i = 0; i < fieldNames.length; i++) {
-            if ("name".equals(fieldNames[i]))
-                name = in.readString();
-            else
-                in.readObject();
-        }
-
-        Object value = create(name);
-
-        in.setRef(ref, value);
-
-        return value;
-    }
-
-    Object create(String name)
-            throws IOException {
-        if (name == null)
-            throw new IOException("Serialized Class expects name.");
-
-        Class cl = _primClasses.get(name);
-
-        if (cl != null)
-            return cl;
-
-        try {
-            if (_loader != null)
-                return Class.forName(name, false, _loader);
-            else
-                return Class.forName(name);
-        } catch (Exception e) {
-            throw new IOExceptionWrapper(e);
-        }
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/ClassSerializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/ClassSerializer.java
deleted file mode 100644
index 7529e17b60..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/ClassSerializer.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-
-/**
- * Serializing a remote object.
- */
-public class ClassSerializer extends AbstractSerializer {
-    @Override
-    public void writeObject(Object obj, AbstractHessianOutput out)
-            throws IOException {
-        Class cl = (Class) obj;
-
-        if (cl == null) {
-            out.writeNull();
-        } else if (out.addRef(obj)) {
-            return;
-        } else {
-            int ref = out.writeObjectBegin("java.lang.Class");
-
-            if (ref < -1) {
-                out.writeString("name");
-                out.writeString(cl.getName());
-                out.writeMapEnd();
-            } else {
-                if (ref == -1) {
-                    out.writeInt(1);
-                    out.writeString("name");
-                    out.writeObjectBegin("java.lang.Class");
-                }
-
-                out.writeString(cl.getName());
-            }
-        }
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/CollectionDeserializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/CollectionDeserializer.java
deleted file mode 100644
index 1d3bc89234..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/CollectionDeserializer.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-/**
- * Deserializing a JDK 1.2 Collection.
- */
-public class CollectionDeserializer extends AbstractListDeserializer {
-    private Class _type;
-
-    public CollectionDeserializer(Class type) {
-        _type = type;
-    }
-
-    @Override
-    public Class getType() {
-        return _type;
-    }
-
-    @Override
-    public Object readList(AbstractHessianInput in, int length)
-            throws IOException {
-        return readList(in, length, null);
-    }
-
-    @Override
-    public Object readList(AbstractHessianInput in, int length, Class<?> expectType) throws IOException {
-        Collection list = createList();
-
-        in.addRef(list);
-
-        Deserializer deserializer = null;
-
-        SerializerFactory factory = findSerializerFactory(in);
-        if (expectType != null) {
-            deserializer = factory.getDeserializer(expectType.getName());
-        }
-
-        while (!in.isEnd())
-            list.add(deserializer != null ? deserializer.readObject(in) : in.readObject());
-
-        in.readEnd();
-
-        return list;
-    }
-
-    @Override
-    public Object readLengthList(AbstractHessianInput in, int length)
-            throws IOException {
-        return readList(in, length, null);
-    }
-
-    @Override
-    public Object readLengthList(AbstractHessianInput in, int length, Class<?> expectType) throws IOException {
-        Collection list = createList();
-
-        in.addRef(list);
-
-        Deserializer deserializer = null;
-
-        SerializerFactory factory = findSerializerFactory(in);
-        if (expectType != null) {
-            deserializer = factory.getDeserializer(expectType.getName());
-        }
-
-        for (; length > 0; length--)
-            list.add(deserializer != null ? deserializer.readObject(in) : in.readObject());
-
-        return list;
-    }
-
-    private Collection createList()
-            throws IOException {
-        Collection list = null;
-
-        if (_type == null)
-            list = new ArrayList();
-        else if (!_type.isInterface()) {
-            try {
-                list = (Collection) _type.newInstance();
-            } catch (Exception e) {
-            }
-        }
-
-        if (list != null) {
-        } else if (SortedSet.class.isAssignableFrom(_type))
-            list = new TreeSet();
-        else if (Set.class.isAssignableFrom(_type))
-            list = new HashSet();
-        else if (List.class.isAssignableFrom(_type))
-            list = new ArrayList();
-        else if (Collection.class.isAssignableFrom(_type))
-            list = new ArrayList();
-        else {
-            try {
-                list = (Collection) _type.newInstance();
-            } catch (Exception e) {
-                throw new IOExceptionWrapper(e);
-            }
-        }
-
-        return list;
-    }
-}
-
-
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/CollectionSerializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/CollectionSerializer.java
deleted file mode 100644
index 7ede5af026..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/CollectionSerializer.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
-/**
- * Serializing a JDK 1.2 Collection.
- */
-public class CollectionSerializer extends AbstractSerializer {
-    private boolean _sendJavaType = true;
-
-    /**
-     * Return true if the java type of the collection should be sent.
-     */
-    public boolean getSendJavaType() {
-        return _sendJavaType;
-    }
-
-    /**
-     * Set true if the java type of the collection should be sent.
-     */
-    public void setSendJavaType(boolean sendJavaType) {
-        _sendJavaType = sendJavaType;
-    }
-
-    @Override
-    public void writeObject(Object obj, AbstractHessianOutput out)
-            throws IOException {
-        if (out.addRef(obj))
-            return;
-
-        Collection list = (Collection) obj;
-
-        Class cl = obj.getClass();
-        boolean hasEnd;
-
-        if (cl.equals(ArrayList.class)
-                || !_sendJavaType
-                || !Serializable.class.isAssignableFrom(cl))
-            hasEnd = out.writeListBegin(list.size(), null);
-        else
-            hasEnd = out.writeListBegin(list.size(), obj.getClass().getName());
-
-        Iterator iter = list.iterator();
-        while (iter.hasNext()) {
-            Object value = iter.next();
-
-            out.writeObject(value);
-        }
-
-        if (hasEnd)
-            out.writeListEnd();
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Deflation.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Deflation.java
deleted file mode 100644
index 11380adede..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Deflation.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.zip.DeflaterOutputStream;
-import java.util.zip.InflaterInputStream;
-
-public class Deflation extends HessianEnvelope {
-    public Deflation() {
-    }
-
-    @Override
-    public Hessian2Output wrap(Hessian2Output out)
-            throws IOException {
-        OutputStream os = new DeflateOutputStream(out);
-
-        Hessian2Output filterOut = new Hessian2Output(os);
-
-        filterOut.setCloseStreamOnClose(true);
-
-        return filterOut;
-    }
-
-    @Override
-    public Hessian2Input unwrap(Hessian2Input in)
-            throws IOException {
-        int version = in.readEnvelope();
-
-        String method = in.readMethod();
-
-        if (!method.equals(getClass().getName()))
-            throw new IOException("expected hessian Envelope method '" +
-                    getClass().getName() + "' at '" + method + "'");
-
-        return unwrapHeaders(in);
-    }
-
-    @Override
-    public Hessian2Input unwrapHeaders(Hessian2Input in)
-            throws IOException {
-        InputStream is = new DeflateInputStream(in);
-
-        Hessian2Input filter = new Hessian2Input(is);
-
-        filter.setCloseStreamOnClose(true);
-
-        return filter;
-    }
-
-    static class DeflateOutputStream extends OutputStream {
-        private Hessian2Output _out;
-        private OutputStream _bodyOut;
-        private DeflaterOutputStream _deflateOut;
-
-        DeflateOutputStream(Hessian2Output out)
-                throws IOException {
-            _out = out;
-
-            _out.startEnvelope(Deflation.class.getName());
-
-            _out.writeInt(0);
-
-            _bodyOut = _out.getBytesOutputStream();
-
-            _deflateOut = new DeflaterOutputStream(_bodyOut);
-        }
-
-        @Override
-        public void write(int ch)
-                throws IOException {
-            _deflateOut.write(ch);
-        }
-
-        @Override
-        public void write(byte[] buffer, int offset, int length)
-                throws IOException {
-            _deflateOut.write(buffer, offset, length);
-        }
-
-        @Override
-        public void close()
-                throws IOException {
-            Hessian2Output out = _out;
-            _out = null;
-
-            if (out != null) {
-                _deflateOut.close();
-                _bodyOut.close();
-
-                out.writeInt(0);
-
-                out.completeEnvelope();
-
-                out.close();
-            }
-        }
-    }
-
-    static class DeflateInputStream extends InputStream {
-        private Hessian2Input _in;
-
-        private InputStream _bodyIn;
-        private InflaterInputStream _inflateIn;
-
-        DeflateInputStream(Hessian2Input in)
-                throws IOException {
-            _in = in;
-
-            int len = in.readInt();
-
-            if (len != 0)
-                throw new IOException("expected no headers");
-
-            _bodyIn = _in.readInputStream();
-
-            _inflateIn = new InflaterInputStream(_bodyIn);
-        }
-
-        @Override
-        public int read()
-                throws IOException {
-            return _inflateIn.read();
-        }
-
-        @Override
-        public int read(byte[] buffer, int offset, int length)
-                throws IOException {
-            return _inflateIn.read(buffer, offset, length);
-        }
-
-        @Override
-        public void close()
-                throws IOException {
-            Hessian2Input in = _in;
-            _in = null;
-
-            if (in != null) {
-                _inflateIn.close();
-                _bodyIn.close();
-
-                int len = in.readInt();
-
-                if (len != 0)
-                    throw new IOException("Unexpected footer");
-
-                in.completeEnvelope();
-
-                in.close();
-            }
-        }
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Deserializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Deserializer.java
deleted file mode 100644
index d8b682490f..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Deserializer.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-
-/**
- * Deserializing an object.
- *
- */
-public interface Deserializer {
-    public Class getType();
-
-    public Object readObject(AbstractHessianInput in)
-            throws IOException;
-
-    public Object readList(AbstractHessianInput in, int length)
-            throws IOException;
-
-    /**
-     * deserialize list object from expect type.
-     *
-     * @param in
-     * @param length
-     * @param expectType
-     * @return
-     * @throws IOException
-     */
-    public Object readList(AbstractHessianInput in, int length, Class<?> expectType)
-            throws IOException;
-
-    public Object readLengthList(AbstractHessianInput in, int length)
-            throws IOException;
-
-    /**
-     * deserialize list object from expect type.
-     *
-     * @param in
-     * @param length
-     * @param expectType
-     * @return
-     * @throws IOException
-     */
-    public Object readLengthList(AbstractHessianInput in, int length, Class<?> expectType)
-            throws IOException;
-
-    public Object readMap(AbstractHessianInput in)
-            throws IOException;
-
-    /**
-     *  deserialize map object from expect key and value type.
-     * @param in
-     * @param expectKeyType
-     * @param expectValueType
-     * @return
-     * @throws IOException
-     */
-    public Object readMap(AbstractHessianInput in, Class<?> expectKeyType, Class<?> expectValueType)
-            throws IOException;
-
-    public Object readObject(AbstractHessianInput in, String[] fieldNames)
-            throws IOException;
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnumDeserializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnumDeserializer.java
deleted file mode 100644
index d1876a8cbc..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnumDeserializer.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.lang.reflect.Method;
-
-/**
- * Deserializing an enum valued object
- */
-public class EnumDeserializer extends AbstractDeserializer {
-    private Class _enumType;
-    private Method _valueOf;
-
-    public EnumDeserializer(Class cl) {
-        // hessian/33b[34], hessian/3bb[78]
-        if (cl.isEnum())
-            _enumType = cl;
-        else if (cl.getSuperclass().isEnum())
-            _enumType = cl.getSuperclass();
-        else
-            throw new RuntimeException("Class " + cl.getName() + " is not an enum");
-
-        try {
-            _valueOf = _enumType.getMethod("valueOf",
-                    new Class[]{Class.class, String.class});
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    @Override
-    public Class getType() {
-        return _enumType;
-    }
-
-    @Override
-    public Object readMap(AbstractHessianInput in)
-            throws IOException {
-        String name = null;
-
-        while (!in.isEnd()) {
-            String key = in.readString();
-
-            if (key.equals("name"))
-                name = in.readString();
-            else
-                in.readObject();
-        }
-
-        in.readMapEnd();
-
-        Object obj = create(name);
-
-        in.addRef(obj);
-
-        return obj;
-    }
-
-    @Override
-    public Object readObject(AbstractHessianInput in, String[] fieldNames)
-            throws IOException {
-        String name = null;
-
-        for (int i = 0; i < fieldNames.length; i++) {
-            if ("name".equals(fieldNames[i]))
-                name = in.readString();
-            else
-                in.readObject();
-        }
-
-        Object obj = create(name);
-
-        in.addRef(obj);
-
-        return obj;
-    }
-
-    private Object create(String name)
-            throws IOException {
-        if (name == null)
-            throw new IOException(_enumType.getName() + " expects name.");
-
-        try {
-            return _valueOf.invoke(null, _enumType, name);
-        } catch (Exception e) {
-            throw new IOExceptionWrapper(e);
-        }
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnumSerializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnumSerializer.java
deleted file mode 100644
index 6ebf1386de..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnumSerializer.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.lang.reflect.Method;
-
-/**
- * Serializing an object for known object types.
- */
-public class EnumSerializer extends AbstractSerializer {
-    private Method _name;
-
-    public EnumSerializer(Class cl) {
-        // hessian/32b[12], hessian/3ab[23]
-        if (!cl.isEnum() && cl.getSuperclass().isEnum())
-            cl = cl.getSuperclass();
-
-        try {
-            _name = cl.getMethod("name", new Class[0]);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    @Override
-    public void writeObject(Object obj, AbstractHessianOutput out)
-            throws IOException {
-        if (out.addRef(obj))
-            return;
-
-        Class cl = obj.getClass();
-
-        if (!cl.isEnum() && cl.getSuperclass().isEnum())
-            cl = cl.getSuperclass();
-
-        String name = null;
-        try {
-            name = (String) _name.invoke(obj, (Object[]) null);
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }
-
-        int ref = out.writeObjectBegin(cl.getName());
-
-        if (ref < -1) {
-            out.writeString("name");
-            out.writeString(name);
-            out.writeMapEnd();
-        } else {
-            if (ref == -1) {
-                out.writeClassFieldLength(1);
-                out.writeString("name");
-                out.writeObjectBegin(cl.getName());
-            }
-
-            out.writeString(name);
-        }
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnumSetHandler.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnumSetHandler.java
deleted file mode 100644
index 3c0a623551..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnumSetHandler.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.Serializable;
-import java.util.Arrays;
-import java.util.EnumSet;
-
-class EnumSetHandler implements Serializable, HessianHandle {
-    private Class type;
-    private Object[] objects;
-
-    EnumSetHandler(Class type, Object[] objects) {
-        this.type = type;
-        this.objects = objects;
-    }
-
-    @SuppressWarnings("unchecked")
-    private Object readResolve() {
-        EnumSet enumSet = EnumSet.noneOf(type);
-        enumSet.addAll(Arrays.asList(objects));
-        return enumSet;
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnumSetSerializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnumSetSerializer.java
deleted file mode 100644
index 9fa4535673..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnumSetSerializer.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.util.EnumSet;
-
-public class EnumSetSerializer extends AbstractSerializer {
-    private static EnumSetSerializer SERIALIZER = new EnumSetSerializer();
-
-    public static EnumSetSerializer getInstance() {
-        return SERIALIZER;
-    }
-
-    @Override
-    public void writeObject(Object obj, AbstractHessianOutput out) throws IOException {
-        if (obj == null) {
-            out.writeNull();
-        } else {
-            try {
-                Field field = EnumSet.class.getDeclaredField("elementType");
-                field.setAccessible(true);
-                Class type = (Class) field.get(obj);
-                EnumSet enumSet = (EnumSet) obj;
-                Object[] objects = enumSet.toArray();
-                out.writeObject(new EnumSetHandler(type, objects));
-            } catch (Throwable t) {
-                throw new IOException(t);
-            }
-        }
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnumerationDeserializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnumerationDeserializer.java
deleted file mode 100644
index b912fa8d21..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnumerationDeserializer.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.util.Vector;
-
-/**
- * Deserializing a JDK 1.2 Collection.
- */
-public class EnumerationDeserializer extends AbstractListDeserializer {
-    private static EnumerationDeserializer _deserializer;
-
-    public static EnumerationDeserializer create() {
-        if (_deserializer == null)
-            _deserializer = new EnumerationDeserializer();
-
-        return _deserializer;
-    }
-
-    @Override
-    public Object readList(AbstractHessianInput in, int length)
-            throws IOException {
-        Vector list = new Vector();
-
-        in.addRef(list);
-
-        while (!in.isEnd())
-            list.add(in.readObject());
-
-        in.readEnd();
-
-        return list.elements();
-    }
-}
-
-
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnumerationSerializer.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnumerationSerializer.java
deleted file mode 100644
index 0665132d5d..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnumerationSerializer.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.util.Enumeration;
-
-/**
- * Serializing a JDK 1.2 Enumeration.
- */
-public class EnumerationSerializer extends AbstractSerializer {
-    private static EnumerationSerializer _serializer;
-
-    public static EnumerationSerializer create() {
-        if (_serializer == null)
-            _serializer = new EnumerationSerializer();
-
-        return _serializer;
-    }
-
-    @Override
-    public void writeObject(Object obj, AbstractHessianOutput out)
-            throws IOException {
-        Enumeration iter = (Enumeration) obj;
-
-        boolean hasEnd = out.writeListBegin(-1, null);
-
-        while (iter.hasMoreElements()) {
-            Object value = iter.nextElement();
-
-            out.writeObject(value);
-        }
-
-        if (hasEnd)
-            out.writeListEnd();
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnvelopeFactory.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnvelopeFactory.java
deleted file mode 100644
index be505fbf87..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/EnvelopeFactory.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.util.logging.Logger;
-
-public class EnvelopeFactory {
-    private static final Logger log
-            = Logger.getLogger(EnvelopeFactory.class.getName());
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/ExtSerializerFactory.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/ExtSerializerFactory.java
deleted file mode 100644
index 1b11a447df..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/ExtSerializerFactory.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.util.HashMap;
-
-/**
- * Factory for returning serialization methods.
- */
-public class ExtSerializerFactory extends AbstractSerializerFactory {
-    private HashMap _serializerMap = new HashMap();
-    private HashMap _deserializerMap = new HashMap();
-
-    /**
-     * Adds a serializer.
-     *
-     * @param cl         the class of the serializer
-     * @param serializer the serializer
-     */
-    public void addSerializer(Class cl, Serializer serializer) {
-        _serializerMap.put(cl, serializer);
-    }
-
-    /**
-     * Adds a deserializer.
-     *
-     * @param cl           the class of the deserializer
-     * @param deserializer the deserializer
-     */
-    public void addDeserializer(Class cl, Deserializer deserializer) {
-        _deserializerMap.put(cl, deserializer);
-    }
-
-    /**
-     * Returns the serializer for a class.
-     *
-     * @param cl the class of the object that needs to be serialized.
-     * @return a serializer object for the serialization.
-     */
-    @Override
-    public Serializer getSerializer(Class cl)
-            throws HessianProtocolException {
-        return (Serializer) _serializerMap.get(cl);
-    }
-
-    /**
-     * Returns the deserializer for a class.
-     *
-     * @param cl the class of the object that needs to be deserialized.
-     * @return a deserializer object for the serialization.
-     */
-    @Override
-    public Deserializer getDeserializer(Class cl)
-            throws HessianProtocolException {
-        return (Deserializer) _deserializerMap.get(cl);
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2Constants.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2Constants.java
deleted file mode 100644
index 993b71fea8..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2Constants.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-public interface Hessian2Constants {
-    public static final int BC_BINARY = 'B'; // final chunk
-    public static final int BC_BINARY_CHUNK = 'A'; // non-final chunk
-    public static final int BC_BINARY_DIRECT = 0x20; // 1-byte length binary
-    public static final int BINARY_DIRECT_MAX = 0x0f;
-    public static final int BC_BINARY_SHORT = 0x34; // 2-byte length binary
-    public static final int BINARY_SHORT_MAX = 0x3ff; // 0-1023 binary
-
-    public static final int BC_CLASS_DEF = 'C'; // object/class definition
-
-    public static final int BC_DATE = 0x4a; // 64-bit millisecond UTC date
-    public static final int BC_DATE_MINUTE = 0x4b; // 32-bit minute UTC date
-
-    public static final int BC_DOUBLE = 'D'; // IEEE 64-bit double
-
-    public static final int BC_DOUBLE_ZERO = 0x5b;
-    public static final int BC_DOUBLE_ONE = 0x5c;
-    public static final int BC_DOUBLE_BYTE = 0x5d;
-    public static final int BC_DOUBLE_SHORT = 0x5e;
-    public static final int BC_DOUBLE_MILL = 0x5f;
-
-    public static final int BC_FALSE = 'F'; // boolean false
-
-    public static final int BC_INT = 'I'; // 32-bit int
-
-    public static final int INT_DIRECT_MIN = -0x10;
-    public static final int INT_DIRECT_MAX = 0x2f;
-    public static final int BC_INT_ZERO = 0x90;
-
-    public static final int INT_BYTE_MIN = -0x800;
-    public static final int INT_BYTE_MAX = 0x7ff;
-    public static final int BC_INT_BYTE_ZERO = 0xc8;
-
-    public static final int BC_END = 'Z';
-
-    public static final int INT_SHORT_MIN = -0x40000;
-    public static final int INT_SHORT_MAX = 0x3ffff;
-    public static final int BC_INT_SHORT_ZERO = 0xd4;
-
-    public static final int BC_LIST_VARIABLE = 0x55;
-    public static final int BC_LIST_FIXED = 'V';
-    public static final int BC_LIST_VARIABLE_UNTYPED = 0x57;
-    public static final int BC_LIST_FIXED_UNTYPED = 0x58;
-
-    public static final int BC_LIST_DIRECT = 0x70;
-    public static final int BC_LIST_DIRECT_UNTYPED = 0x78;
-    public static final int LIST_DIRECT_MAX = 0x7;
-
-    public static final int BC_LONG = 'L'; // 64-bit signed integer
-    public static final long LONG_DIRECT_MIN = -0x08;
-    public static final long LONG_DIRECT_MAX = 0x0f;
-    public static final int BC_LONG_ZERO = 0xe0;
-
-    public static final long LONG_BYTE_MIN = -0x800;
-    public static final long LONG_BYTE_MAX = 0x7ff;
-    public static final int BC_LONG_BYTE_ZERO = 0xf8;
-
-    public static final int LONG_SHORT_MIN = -0x40000;
-    public static final int LONG_SHORT_MAX = 0x3ffff;
-    public static final int BC_LONG_SHORT_ZERO = 0x3c;
-
-    public static final int BC_LONG_INT = 0x59;
-
-    public static final int BC_MAP = 'M';
-    public static final int BC_MAP_UNTYPED = 'H';
-
-    public static final int BC_NULL = 'N';
-
-    public static final int BC_OBJECT = 'O';
-    public static final int BC_OBJECT_DEF = 'C';
-
-    public static final int BC_OBJECT_DIRECT = 0x60;
-    public static final int OBJECT_DIRECT_MAX = 0x0f;
-
-    public static final int BC_REF = 0x51;
-
-    public static final int BC_STRING = 'S'; // final string
-    public static final int BC_STRING_CHUNK = 'R'; // non-final string
-
-    public static final int BC_STRING_DIRECT = 0x00;
-    public static final int STRING_DIRECT_MAX = 0x1f;
-    public static final int BC_STRING_SHORT = 0x30;
-    public static final int STRING_SHORT_MAX = 0x3ff;
-
-    public static final int BC_TRUE = 'T';
-
-    public static final int P_PACKET_CHUNK = 0x4f;
-    public static final int P_PACKET = 'P';
-
-    public static final int P_PACKET_DIRECT = 0x80;
-    public static final int PACKET_DIRECT_MAX = 0x7f;
-
-    public static final int P_PACKET_SHORT = 0x70;
-    public static final int PACKET_SHORT_MAX = 0xfff;
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2Input.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2Input.java
deleted file mode 100644
index 8d6d7d7b70..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2Input.java
+++ /dev/null
@@ -1,3615 +0,0 @@
-/*
- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.ByteArrayOutputStream;
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Input stream for Hessian requests.
- * <p>
- * <p>HessianInput is unbuffered, so any client needs to provide
- * its own buffering.
- * <p>
- * <pre>
- * InputStream is = ...; // from http connection
- * HessianInput in = new HessianInput(is);
- * String value;
- *
- * in.startReply();         // read reply header
- * value = in.readString(); // read string value
- * in.completeReply();      // read reply footer
- * </pre>
- */
-public class Hessian2Input
-        extends AbstractHessianInput
-        implements Hessian2Constants {
-    private static final Logger log
-            = Logger.getLogger(Hessian2Input.class.getName());
-
-    private static final double D_256 = 1.0 / 256.0;
-    private static final int END_OF_DATA = -2;
-    private static final int SIZE = 256;
-    private static final int GAP = 16;
-    private static Field _detailMessageField;
-    private static boolean _isCloseStreamOnClose;
-
-    static {
-        try {
-            _detailMessageField = Throwable.class.getDeclaredField("detailMessage");
-            _detailMessageField.setAccessible(true);
-        } catch (Throwable e) {
-        }
-    }
-
-    private final byte[] _buffer = new byte[SIZE];
-    // factory for deserializing objects in the input stream
-    protected SerializerFactory _serializerFactory;
-    protected ArrayList _refs;
-    protected ArrayList _classDefs;
-    protected ArrayList _types;
-    // the underlying input stream
-    private InputStream _is;
-    // a peek character
-    private int _offset;
-    private int _length;
-    // true for streaming data
-    private boolean _isStreaming;
-    // the method for a call
-    private String _method;
-    private int _argLength;
-    private Reader _chunkReader;
-    private InputStream _chunkInputStream;
-    private Throwable _replyFault;
-    private StringBuilder _sbuf = new StringBuilder();
-    // true if this is the last chunk
-    private boolean _isLastChunk;
-    // the chunk length
-    private int _chunkLength;
-
-    /**
-     * Creates a new Hessian input stream, initialized with an
-     * underlying input stream.
-     *
-     * @param is the underlying input stream.
-     */
-    public Hessian2Input(InputStream is) {
-        _is = is;
-    }
-
-    /**
-     * Gets the serializer factory.
-     */
-    public SerializerFactory getSerializerFactory() {
-        return _serializerFactory;
-    }
-
-    /**
-     * Sets the serializer factory.
-     */
-    @Override
-    public void setSerializerFactory(SerializerFactory factory) {
-        _serializerFactory = factory;
-    }
-
-    /**
-     * Gets the serializer factory, creating a default if necessary.
-     */
-    public final SerializerFactory findSerializerFactory() {
-        SerializerFactory factory = _serializerFactory;
-
-        if (factory == null)
-            _serializerFactory = factory = new SerializerFactory();
-
-        return factory;
-    }
-
-    public boolean isCloseStreamOnClose() {
-        return _isCloseStreamOnClose;
-    }
-
-    public void setCloseStreamOnClose(boolean isClose) {
-        _isCloseStreamOnClose = isClose;
-    }
-
-    /**
-     * Returns the calls method
-     */
-    @Override
-    public String getMethod() {
-        return _method;
-    }
-
-    /**
-     * Returns any reply fault.
-     */
-    public Throwable getReplyFault() {
-        return _replyFault;
-    }
-
-    /**
-     * Starts reading the call
-     * <p>
-     * <pre>
-     * c major minor
-     * </pre>
-     */
-    @Override
-    public int readCall()
-            throws IOException {
-        int tag = read();
-
-        if (tag != 'C')
-            throw error("expected hessian call ('C') at " + codeName(tag));
-
-        return 0;
-    }
-
-    /**
-     * Starts reading the envelope
-     * <p>
-     * <pre>
-     * E major minor
-     * </pre>
-     */
-    public int readEnvelope()
-            throws IOException {
-        int tag = read();
-        int version = 0;
-
-        if (tag == 'H') {
-            int major = read();
-            int minor = read();
-
-            version = (major << 16) + minor;
-
-            tag = read();
-        }
-
-        if (tag != 'E')
-            throw error("expected hessian Envelope ('E') at " + codeName(tag));
-
-        return version;
-    }
-
-    /**
-     * Completes reading the envelope
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * Z
-     * </pre>
-     */
-    public void completeEnvelope()
-            throws IOException {
-        int tag = read();
-
-        if (tag != 'Z')
-            error("expected end of envelope at " + codeName(tag));
-    }
-
-    /**
-     * Starts reading the call
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * string
-     * </pre>
-     */
-    @Override
-    public String readMethod()
-            throws IOException {
-        _method = readString();
-
-        return _method;
-    }
-
-    /**
-     * Returns the number of method arguments
-     * <p>
-     * <pre>
-     * int
-     * </pre>
-     */
-    @Override
-    public int readMethodArgLength()
-            throws IOException {
-        return readInt();
-    }
-
-    /**
-     * Starts reading the call, including the headers.
-     * <p>
-     * <p>The call expects the following protocol data
-     * <p>
-     * <pre>
-     * c major minor
-     * m b16 b8 method
-     * </pre>
-     */
-    @Override
-    public void startCall()
-            throws IOException {
-        readCall();
-
-        readMethod();
-    }
-
-    /**
-     * Completes reading the call
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * </pre>
-     */
-    @Override
-    public void completeCall()
-            throws IOException {
-    }
-
-    /**
-     * Reads a reply as an object.
-     * If the reply has a fault, throws the exception.
-     */
-    @Override
-    public Object readReply(Class expectedClass)
-            throws Throwable {
-        int tag = read();
-
-        if (tag == 'R')
-            return readObject(expectedClass);
-        else if (tag == 'F') {
-            HashMap map = (HashMap) readObject(HashMap.class);
-
-            throw prepareFault(map);
-        } else {
-            StringBuilder sb = new StringBuilder();
-            sb.append((char) tag);
-
-            try {
-                int ch;
-
-                while ((ch = read()) >= 0) {
-                    sb.append((char) ch);
-                }
-            } catch (IOException e) {
-                log.log(Level.FINE, e.toString(), e);
-            }
-
-            throw error("expected hessian reply at " + codeName(tag) + "\n"
-                    + sb);
-        }
-    }
-
-    /**
-     * Starts reading the reply
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * r
-     * </pre>
-     */
-    @Override
-    public void startReply()
-            throws Throwable {
-        // XXX: for variable length (?)
-
-        readReply(Object.class);
-    }
-
-    /**
-     * Prepares the fault.
-     */
-    private Throwable prepareFault(HashMap fault)
-            throws IOException {
-        Object detail = fault.get("detail");
-        String message = (String) fault.get("message");
-
-        if (detail instanceof Throwable) {
-            _replyFault = (Throwable) detail;
-
-            if (message != null && _detailMessageField != null) {
-                try {
-                    _detailMessageField.set(_replyFault, message);
-                } catch (Throwable e) {
-                }
-            }
-
-            return _replyFault;
-        } else {
-            String code = (String) fault.get("code");
-
-            _replyFault = new HessianServiceException(message, code, detail);
-
-            return _replyFault;
-        }
-    }
-
-    /**
-     * Completes reading the call
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * z
-     * </pre>
-     */
-    @Override
-    public void completeReply()
-            throws IOException {
-    }
-
-    /**
-     * Completes reading the call
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * z
-     * </pre>
-     */
-    public void completeValueReply()
-            throws IOException {
-        int tag = read();
-
-        if (tag != 'Z')
-            error("expected end of reply at " + codeName(tag));
-    }
-
-    /**
-     * Reads a header, returning null if there are no headers.
-     * <p>
-     * <pre>
-     * H b16 b8 value
-     * </pre>
-     */
-    @Override
-    public String readHeader()
-            throws IOException {
-        return null;
-    }
-
-    /**
-     * Starts reading the message
-     * <p>
-     * <pre>
-     * p major minor
-     * </pre>
-     */
-    public int startMessage()
-            throws IOException {
-        int tag = read();
-
-        if (tag == 'p')
-            _isStreaming = false;
-        else if (tag == 'P')
-            _isStreaming = true;
-        else
-            throw error("expected Hessian message ('p') at " + codeName(tag));
-
-        int major = read();
-        int minor = read();
-
-        return (major << 16) + minor;
-    }
-
-    /**
-     * Completes reading the message
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * z
-     * </pre>
-     */
-    public void completeMessage()
-            throws IOException {
-        int tag = read();
-
-        if (tag != 'Z')
-            error("expected end of message at " + codeName(tag));
-    }
-
-    /**
-     * Reads a null
-     * <p>
-     * <pre>
-     * N
-     * </pre>
-     */
-    @Override
-    public void readNull()
-            throws IOException {
-        int tag = read();
-
-        switch (tag) {
-            case 'N':
-                return;
-
-            default:
-                throw expect("null", tag);
-        }
-    }
-
-    /**
-     * Reads a boolean
-     * <p>
-     * <pre>
-     * T
-     * F
-     * </pre>
-     */
-    @Override
-    public boolean readBoolean()
-            throws IOException {
-        int tag = _offset < _length ? (_buffer[_offset++] & 0xff) : read();
-
-        switch (tag) {
-            case 'T':
-                return true;
-            case 'F':
-                return false;
-
-            // direct integer
-            case 0x80:
-            case 0x81:
-            case 0x82:
-            case 0x83:
-            case 0x84:
-            case 0x85:
-            case 0x86:
-            case 0x87:
-            case 0x88:
-            case 0x89:
-            case 0x8a:
-            case 0x8b:
-            case 0x8c:
-            case 0x8d:
-            case 0x8e:
-            case 0x8f:
-
-            case 0x90:
-            case 0x91:
-            case 0x92:
-            case 0x93:
-            case 0x94:
-            case 0x95:
-            case 0x96:
-            case 0x97:
-            case 0x98:
-            case 0x99:
-            case 0x9a:
-            case 0x9b:
-            case 0x9c:
-            case 0x9d:
-            case 0x9e:
-            case 0x9f:
-
-            case 0xa0:
-            case 0xa1:
-            case 0xa2:
-            case 0xa3:
-            case 0xa4:
-            case 0xa5:
-            case 0xa6:
-            case 0xa7:
-            case 0xa8:
-            case 0xa9:
-            case 0xaa:
-            case 0xab:
-            case 0xac:
-            case 0xad:
-            case 0xae:
-            case 0xaf:
-
-            case 0xb0:
-            case 0xb1:
-            case 0xb2:
-            case 0xb3:
-            case 0xb4:
-            case 0xb5:
-            case 0xb6:
-            case 0xb7:
-            case 0xb8:
-            case 0xb9:
-            case 0xba:
-            case 0xbb:
-            case 0xbc:
-            case 0xbd:
-            case 0xbe:
-            case 0xbf:
-                return tag != BC_INT_ZERO;
-
-            // INT_BYTE = 0
-            case 0xc8:
-                return read() != 0;
-
-            // INT_BYTE != 0
-            case 0xc0:
-            case 0xc1:
-            case 0xc2:
-            case 0xc3:
-            case 0xc4:
-            case 0xc5:
-            case 0xc6:
-            case 0xc7:
-            case 0xc9:
-            case 0xca:
-            case 0xcb:
-            case 0xcc:
-            case 0xcd:
-            case 0xce:
-            case 0xcf:
-                read();
-                return true;
-
-            // INT_SHORT = 0
-            case 0xd4:
-                return (256 * read() + read()) != 0;
-
-            // INT_SHORT != 0
-            case 0xd0:
-            case 0xd1:
-            case 0xd2:
-            case 0xd3:
-            case 0xd5:
-            case 0xd6:
-            case 0xd7:
-                read();
-                read();
-                return true;
-
-            case 'I':
-                return
-                        parseInt() != 0;
-
-            case 0xd8:
-            case 0xd9:
-            case 0xda:
-            case 0xdb:
-            case 0xdc:
-            case 0xdd:
-            case 0xde:
-            case 0xdf:
-
-            case 0xe0:
-            case 0xe1:
-            case 0xe2:
-            case 0xe3:
-            case 0xe4:
-            case 0xe5:
-            case 0xe6:
-            case 0xe7:
-            case 0xe8:
-            case 0xe9:
-            case 0xea:
-            case 0xeb:
-            case 0xec:
-            case 0xed:
-            case 0xee:
-            case 0xef:
-                return tag != BC_LONG_ZERO;
-
-            // LONG_BYTE = 0
-            case 0xf8:
-                return read() != 0;
-
-            // LONG_BYTE != 0
-            case 0xf0:
-            case 0xf1:
-            case 0xf2:
-            case 0xf3:
-            case 0xf4:
-            case 0xf5:
-            case 0xf6:
-            case 0xf7:
-            case 0xf9:
-            case 0xfa:
-            case 0xfb:
-            case 0xfc:
-            case 0xfd:
-            case 0xfe:
-            case 0xff:
-                read();
-                return true;
-
-            // INT_SHORT = 0
-            case 0x3c:
-                return (256 * read() + read()) != 0;
-
-            // INT_SHORT != 0
-            case 0x38:
-            case 0x39:
-            case 0x3a:
-            case 0x3b:
-            case 0x3d:
-            case 0x3e:
-            case 0x3f:
-                read();
-                read();
-                return true;
-
-            case BC_LONG_INT:
-                return (0x1000000L * read()
-                        + 0x10000L * read()
-                        + 0x100 * read()
-                        + read()) != 0;
-
-            case 'L':
-                return parseLong() != 0;
-
-            case BC_DOUBLE_ZERO:
-                return false;
-
-            case BC_DOUBLE_ONE:
-                return true;
-
-            case BC_DOUBLE_BYTE:
-                return read() != 0;
-
-            case BC_DOUBLE_SHORT:
-                return (0x100 * read() + read()) != 0;
-
-            case BC_DOUBLE_MILL: {
-                int mills = parseInt();
-
-                return mills != 0;
-            }
-
-            case 'D':
-                return parseDouble() != 0.0;
-
-            case 'N':
-                return false;
-
-            default:
-                throw expect("boolean", tag);
-        }
-    }
-
-    /**
-     * Reads a short
-     * <p>
-     * <pre>
-     * I b32 b24 b16 b8
-     * </pre>
-     */
-    public short readShort()
-            throws IOException {
-        return (short) readInt();
-    }
-
-    /**
-     * Reads an integer
-     * <p>
-     * <pre>
-     * I b32 b24 b16 b8
-     * </pre>
-     */
-    @Override
-    public final int readInt()
-            throws IOException {
-        //int tag = _offset < _length ? (_buffer[_offset++] & 0xff) : read();
-        int tag = read();
-
-        switch (tag) {
-            case 'N':
-                return 0;
-
-            case 'F':
-                return 0;
-
-            case 'T':
-                return 1;
-
-            // direct integer
-            case 0x80:
-            case 0x81:
-            case 0x82:
-            case 0x83:
-            case 0x84:
-            case 0x85:
-            case 0x86:
-            case 0x87:
-            case 0x88:
-            case 0x89:
-            case 0x8a:
-            case 0x8b:
-            case 0x8c:
-            case 0x8d:
-            case 0x8e:
-            case 0x8f:
-
-            case 0x90:
-            case 0x91:
-            case 0x92:
-            case 0x93:
-            case 0x94:
-            case 0x95:
-            case 0x96:
-            case 0x97:
-            case 0x98:
-            case 0x99:
-            case 0x9a:
-            case 0x9b:
-            case 0x9c:
-            case 0x9d:
-            case 0x9e:
-            case 0x9f:
-
-            case 0xa0:
-            case 0xa1:
-            case 0xa2:
-            case 0xa3:
-            case 0xa4:
-            case 0xa5:
-            case 0xa6:
-            case 0xa7:
-            case 0xa8:
-            case 0xa9:
-            case 0xaa:
-            case 0xab:
-            case 0xac:
-            case 0xad:
-            case 0xae:
-            case 0xaf:
-
-            case 0xb0:
-            case 0xb1:
-            case 0xb2:
-            case 0xb3:
-            case 0xb4:
-            case 0xb5:
-            case 0xb6:
-            case 0xb7:
-            case 0xb8:
-            case 0xb9:
-            case 0xba:
-            case 0xbb:
-            case 0xbc:
-            case 0xbd:
-            case 0xbe:
-            case 0xbf:
-                return tag - BC_INT_ZERO;
-
-      /* byte int */
-            case 0xc0:
-            case 0xc1:
-            case 0xc2:
-            case 0xc3:
-            case 0xc4:
-            case 0xc5:
-            case 0xc6:
-            case 0xc7:
-            case 0xc8:
-            case 0xc9:
-            case 0xca:
-            case 0xcb:
-            case 0xcc:
-            case 0xcd:
-            case 0xce:
-            case 0xcf:
-                return ((tag - BC_INT_BYTE_ZERO) << 8) + read();
-
-      /* short int */
-            case 0xd0:
-            case 0xd1:
-            case 0xd2:
-            case 0xd3:
-            case 0xd4:
-            case 0xd5:
-            case 0xd6:
-            case 0xd7:
-                return ((tag - BC_INT_SHORT_ZERO) << 16) + 256 * read() + read();
-
-            case 'I':
-            case BC_LONG_INT:
-                return ((read() << 24)
-                        + (read() << 16)
-                        + (read() << 8)
-                        + read());
-
-            // direct long
-            case 0xd8:
-            case 0xd9:
-            case 0xda:
-            case 0xdb:
-            case 0xdc:
-            case 0xdd:
-            case 0xde:
-            case 0xdf:
-
-            case 0xe0:
-            case 0xe1:
-            case 0xe2:
-            case 0xe3:
-            case 0xe4:
-            case 0xe5:
-            case 0xe6:
-            case 0xe7:
-            case 0xe8:
-            case 0xe9:
-            case 0xea:
-            case 0xeb:
-            case 0xec:
-            case 0xed:
-            case 0xee:
-            case 0xef:
-                return tag - BC_LONG_ZERO;
-
-      /* byte long */
-            case 0xf0:
-            case 0xf1:
-            case 0xf2:
-            case 0xf3:
-            case 0xf4:
-            case 0xf5:
-            case 0xf6:
-            case 0xf7:
-            case 0xf8:
-            case 0xf9:
-            case 0xfa:
-            case 0xfb:
-            case 0xfc:
-            case 0xfd:
-            case 0xfe:
-            case 0xff:
-                return ((tag - BC_LONG_BYTE_ZERO) << 8) + read();
-
-      /* short long */
-            case 0x38:
-            case 0x39:
-            case 0x3a:
-            case 0x3b:
-            case 0x3c:
-            case 0x3d:
-            case 0x3e:
-            case 0x3f:
-                return ((tag - BC_LONG_SHORT_ZERO) << 16) + 256 * read() + read();
-
-            case 'L':
-                return (int) parseLong();
-
-            case BC_DOUBLE_ZERO:
-                return 0;
-
-            case BC_DOUBLE_ONE:
-                return 1;
-
-            //case LONG_BYTE:
-            case BC_DOUBLE_BYTE:
-                return (byte) (_offset < _length ? _buffer[_offset++] : read());
-
-            //case INT_SHORT:
-            //case LONG_SHORT:
-            case BC_DOUBLE_SHORT:
-                return (short) (256 * read() + read());
-
-            case BC_DOUBLE_MILL: {
-                int mills = parseInt();
-
-                return (int) (0.001 * mills);
-            }
-
-            case 'D':
-                return (int) parseDouble();
-
-            default:
-                throw expect("integer", tag);
-        }
-    }
-
-    /**
-     * Reads a long
-     * <p>
-     * <pre>
-     * L b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre>
-     */
-    @Override
-    public long readLong()
-            throws IOException {
-        int tag = read();
-
-        switch (tag) {
-            case 'N':
-                return 0;
-
-            case 'F':
-                return 0;
-
-            case 'T':
-                return 1;
-
-            // direct integer
-            case 0x80:
-            case 0x81:
-            case 0x82:
-            case 0x83:
-            case 0x84:
-            case 0x85:
-            case 0x86:
-            case 0x87:
-            case 0x88:
-            case 0x89:
-            case 0x8a:
-            case 0x8b:
-            case 0x8c:
-            case 0x8d:
-            case 0x8e:
-            case 0x8f:
-
-            case 0x90:
-            case 0x91:
-            case 0x92:
-            case 0x93:
-            case 0x94:
-            case 0x95:
-            case 0x96:
-            case 0x97:
-            case 0x98:
-            case 0x99:
-            case 0x9a:
-            case 0x9b:
-            case 0x9c:
-            case 0x9d:
-            case 0x9e:
-            case 0x9f:
-
-            case 0xa0:
-            case 0xa1:
-            case 0xa2:
-            case 0xa3:
-            case 0xa4:
-            case 0xa5:
-            case 0xa6:
-            case 0xa7:
-            case 0xa8:
-            case 0xa9:
-            case 0xaa:
-            case 0xab:
-            case 0xac:
-            case 0xad:
-            case 0xae:
-            case 0xaf:
-
-            case 0xb0:
-            case 0xb1:
-            case 0xb2:
-            case 0xb3:
-            case 0xb4:
-            case 0xb5:
-            case 0xb6:
-            case 0xb7:
-            case 0xb8:
-            case 0xb9:
-            case 0xba:
-            case 0xbb:
-            case 0xbc:
-            case 0xbd:
-            case 0xbe:
-            case 0xbf:
-                return tag - BC_INT_ZERO;
-
-      /* byte int */
-            case 0xc0:
-            case 0xc1:
-            case 0xc2:
-            case 0xc3:
-            case 0xc4:
-            case 0xc5:
-            case 0xc6:
-            case 0xc7:
-            case 0xc8:
-            case 0xc9:
-            case 0xca:
-            case 0xcb:
-            case 0xcc:
-            case 0xcd:
-            case 0xce:
-            case 0xcf:
-                return ((tag - BC_INT_BYTE_ZERO) << 8) + read();
-
-      /* short int */
-            case 0xd0:
-            case 0xd1:
-            case 0xd2:
-            case 0xd3:
-            case 0xd4:
-            case 0xd5:
-            case 0xd6:
-            case 0xd7:
-                return ((tag - BC_INT_SHORT_ZERO) << 16) + 256 * read() + read();
-
-            //case LONG_BYTE:
-            case BC_DOUBLE_BYTE:
-                return (byte) (_offset < _length ? _buffer[_offset++] : read());
-
-            //case INT_SHORT:
-            //case LONG_SHORT:
-            case BC_DOUBLE_SHORT:
-                return (short) (256 * read() + read());
-
-            case 'I':
-            case BC_LONG_INT:
-                return parseInt();
-
-            // direct long
-            case 0xd8:
-            case 0xd9:
-            case 0xda:
-            case 0xdb:
-            case 0xdc:
-            case 0xdd:
-            case 0xde:
-            case 0xdf:
-
-            case 0xe0:
-            case 0xe1:
-            case 0xe2:
-            case 0xe3:
-            case 0xe4:
-            case 0xe5:
-            case 0xe6:
-            case 0xe7:
-            case 0xe8:
-            case 0xe9:
-            case 0xea:
-            case 0xeb:
-            case 0xec:
-            case 0xed:
-            case 0xee:
-            case 0xef:
-                return tag - BC_LONG_ZERO;
-
-      /* byte long */
-            case 0xf0:
-            case 0xf1:
-            case 0xf2:
-            case 0xf3:
-            case 0xf4:
-            case 0xf5:
-            case 0xf6:
-            case 0xf7:
-            case 0xf8:
-            case 0xf9:
-            case 0xfa:
-            case 0xfb:
-            case 0xfc:
-            case 0xfd:
-            case 0xfe:
-            case 0xff:
-                return ((tag - BC_LONG_BYTE_ZERO) << 8) + read();
-
-      /* short long */
-            case 0x38:
-            case 0x39:
-            case 0x3a:
-            case 0x3b:
-            case 0x3c:
-            case 0x3d:
-            case 0x3e:
-            case 0x3f:
-                return ((tag - BC_LONG_SHORT_ZERO) << 16) + 256 * read() + read();
-
-            case 'L':
-                return parseLong();
-
-            case BC_DOUBLE_ZERO:
-                return 0;
-
-            case BC_DOUBLE_ONE:
-                return 1;
-
-            case BC_DOUBLE_MILL: {
-                int mills = parseInt();
-
-                return (long) (0.001 * mills);
-            }
-
-            case 'D':
-                return (long) parseDouble();
-
-            default:
-                throw expect("long", tag);
-        }
-    }
-
-    /**
-     * Reads a float
-     * <p>
-     * <pre>
-     * D b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre>
-     */
-    public float readFloat()
-            throws IOException {
-        return (float) readDouble();
-    }
-
-    /**
-     * Reads a double
-     * <p>
-     * <pre>
-     * D b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre>
-     */
-    @Override
-    public double readDouble()
-            throws IOException {
-        int tag = read();
-
-        switch (tag) {
-            case 'N':
-                return 0;
-
-            case 'F':
-                return 0;
-
-            case 'T':
-                return 1;
-
-            // direct integer
-            case 0x80:
-            case 0x81:
-            case 0x82:
-            case 0x83:
-            case 0x84:
-            case 0x85:
-            case 0x86:
-            case 0x87:
-            case 0x88:
-            case 0x89:
-            case 0x8a:
-            case 0x8b:
-            case 0x8c:
-            case 0x8d:
-            case 0x8e:
-            case 0x8f:
-
-            case 0x90:
-            case 0x91:
-            case 0x92:
-            case 0x93:
-            case 0x94:
-            case 0x95:
-            case 0x96:
-            case 0x97:
-            case 0x98:
-            case 0x99:
-            case 0x9a:
-            case 0x9b:
-            case 0x9c:
-            case 0x9d:
-            case 0x9e:
-            case 0x9f:
-
-            case 0xa0:
-            case 0xa1:
-            case 0xa2:
-            case 0xa3:
-            case 0xa4:
-            case 0xa5:
-            case 0xa6:
-            case 0xa7:
-            case 0xa8:
-            case 0xa9:
-            case 0xaa:
-            case 0xab:
-            case 0xac:
-            case 0xad:
-            case 0xae:
-            case 0xaf:
-
-            case 0xb0:
-            case 0xb1:
-            case 0xb2:
-            case 0xb3:
-            case 0xb4:
-            case 0xb5:
-            case 0xb6:
-            case 0xb7:
-            case 0xb8:
-            case 0xb9:
-            case 0xba:
-            case 0xbb:
-            case 0xbc:
-            case 0xbd:
-            case 0xbe:
-            case 0xbf:
-                return tag - 0x90;
-
-      /* byte int */
-            case 0xc0:
-            case 0xc1:
-            case 0xc2:
-            case 0xc3:
-            case 0xc4:
-            case 0xc5:
-            case 0xc6:
-            case 0xc7:
-            case 0xc8:
-            case 0xc9:
-            case 0xca:
-            case 0xcb:
-            case 0xcc:
-            case 0xcd:
-            case 0xce:
-            case 0xcf:
-                return ((tag - BC_INT_BYTE_ZERO) << 8) + read();
-
-      /* short int */
-            case 0xd0:
-            case 0xd1:
-            case 0xd2:
-            case 0xd3:
-            case 0xd4:
-            case 0xd5:
-            case 0xd6:
-            case 0xd7:
-                return ((tag - BC_INT_SHORT_ZERO) << 16) + 256 * read() + read();
-
-            case 'I':
-            case BC_LONG_INT:
-                return parseInt();
-
-            // direct long
-            case 0xd8:
-            case 0xd9:
-            case 0xda:
-            case 0xdb:
-            case 0xdc:
-            case 0xdd:
-            case 0xde:
-            case 0xdf:
-
-            case 0xe0:
-            case 0xe1:
-            case 0xe2:
-            case 0xe3:
-            case 0xe4:
-            case 0xe5:
-            case 0xe6:
-            case 0xe7:
-            case 0xe8:
-            case 0xe9:
-            case 0xea:
-            case 0xeb:
-            case 0xec:
-            case 0xed:
-            case 0xee:
-            case 0xef:
-                return tag - BC_LONG_ZERO;
-
-      /* byte long */
-            case 0xf0:
-            case 0xf1:
-            case 0xf2:
-            case 0xf3:
-            case 0xf4:
-            case 0xf5:
-            case 0xf6:
-            case 0xf7:
-            case 0xf8:
-            case 0xf9:
-            case 0xfa:
-            case 0xfb:
-            case 0xfc:
-            case 0xfd:
-            case 0xfe:
-            case 0xff:
-                return ((tag - BC_LONG_BYTE_ZERO) << 8) + read();
-
-      /* short long */
-            case 0x38:
-            case 0x39:
-            case 0x3a:
-            case 0x3b:
-            case 0x3c:
-            case 0x3d:
-            case 0x3e:
-            case 0x3f:
-                return ((tag - BC_LONG_SHORT_ZERO) << 16) + 256 * read() + read();
-
-            case 'L':
-                return (double) parseLong();
-
-            case BC_DOUBLE_ZERO:
-                return 0;
-
-            case BC_DOUBLE_ONE:
-                return 1;
-
-            case BC_DOUBLE_BYTE:
-                return (byte) (_offset < _length ? _buffer[_offset++] : read());
-
-            case BC_DOUBLE_SHORT:
-                return (short) (256 * read() + read());
-
-            case BC_DOUBLE_MILL: {
-                int mills = parseInt();
-
-                return 0.001 * mills;
-            }
-
-            case 'D':
-                return parseDouble();
-
-            default:
-                throw expect("double", tag);
-        }
-    }
-
-    /**
-     * Reads a date.
-     * <p>
-     * <pre>
-     * T b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre>
-     */
-    @Override
-    public long readUTCDate()
-            throws IOException {
-        int tag = read();
-
-        if (tag == BC_DATE) {
-            return parseLong();
-        } else if (tag == BC_DATE_MINUTE) {
-            return parseInt() * 60000L;
-        } else
-            throw expect("date", tag);
-    }
-
-    /**
-     * Reads a byte from the stream.
-     */
-    public int readChar()
-            throws IOException {
-        if (_chunkLength > 0) {
-            _chunkLength--;
-            if (_chunkLength == 0 && _isLastChunk)
-                _chunkLength = END_OF_DATA;
-
-            int ch = parseUTF8Char();
-            return ch;
-        } else if (_chunkLength == END_OF_DATA) {
-            _chunkLength = 0;
-            return -1;
-        }
-
-        int tag = read();
-
-        switch (tag) {
-            case 'N':
-                return -1;
-
-            case 'S':
-            case BC_STRING_CHUNK:
-                _isLastChunk = tag == 'S';
-                _chunkLength = (read() << 8) + read();
-
-                _chunkLength--;
-                int value = parseUTF8Char();
-
-                // special code so successive read byte won't
-                // be read as a single object.
-                if (_chunkLength == 0 && _isLastChunk)
-                    _chunkLength = END_OF_DATA;
-
-                return value;
-
-            default:
-                throw expect("char", tag);
-        }
-    }
-
-    /**
-     * Reads a byte array from the stream.
-     */
-    public int readString(char[] buffer, int offset, int length)
-            throws IOException {
-        int readLength = 0;
-
-        if (_chunkLength == END_OF_DATA) {
-            _chunkLength = 0;
-            return -1;
-        } else if (_chunkLength == 0) {
-            int tag = read();
-
-            switch (tag) {
-                case 'N':
-                    return -1;
-
-                case 'S':
-                case BC_STRING_CHUNK:
-                    _isLastChunk = tag == 'S';
-                    _chunkLength = (read() << 8) + read();
-                    break;
-
-                case 0x00:
-                case 0x01:
-                case 0x02:
-                case 0x03:
-                case 0x04:
-                case 0x05:
-                case 0x06:
-                case 0x07:
-                case 0x08:
-                case 0x09:
-                case 0x0a:
-                case 0x0b:
-                case 0x0c:
-                case 0x0d:
-                case 0x0e:
-                case 0x0f:
-
-                case 0x10:
-                case 0x11:
-                case 0x12:
-                case 0x13:
-                case 0x14:
-                case 0x15:
-                case 0x16:
-                case 0x17:
-                case 0x18:
-                case 0x19:
-                case 0x1a:
-                case 0x1b:
-                case 0x1c:
-                case 0x1d:
-                case 0x1e:
-                case 0x1f:
-                    _isLastChunk = true;
-                    _chunkLength = tag - 0x00;
-                    break;
-
-                default:
-                    throw expect("string", tag);
-            }
-        }
-
-        while (length > 0) {
-            if (_chunkLength > 0) {
-                buffer[offset++] = (char) parseUTF8Char();
-                _chunkLength--;
-                length--;
-                readLength++;
-            } else if (_isLastChunk) {
-                if (readLength == 0)
-                    return -1;
-                else {
-                    _chunkLength = END_OF_DATA;
-                    return readLength;
-                }
-            } else {
-                int tag = read();
-
-                switch (tag) {
-                    case 'S':
-                    case BC_STRING_CHUNK:
-                        _isLastChunk = tag == 'S';
-                        _chunkLength = (read() << 8) + read();
-                        break;
-
-                    default:
-                        throw expect("string", tag);
-                }
-            }
-        }
-
-        if (readLength == 0)
-            return -1;
-        else if (_chunkLength > 0 || !_isLastChunk)
-            return readLength;
-        else {
-            _chunkLength = END_OF_DATA;
-            return readLength;
-        }
-    }
-
-    /**
-     * Reads a string
-     * <p>
-     * <pre>
-     * S b16 b8 string value
-     * </pre>
-     */
-    @Override
-    public String readString()
-            throws IOException {
-        int tag = read();
-
-        switch (tag) {
-            case 'N':
-                return null;
-            case 'T':
-                return "true";
-            case 'F':
-                return "false";
-
-            // direct integer
-            case 0x80:
-            case 0x81:
-            case 0x82:
-            case 0x83:
-            case 0x84:
-            case 0x85:
-            case 0x86:
-            case 0x87:
-            case 0x88:
-            case 0x89:
-            case 0x8a:
-            case 0x8b:
-            case 0x8c:
-            case 0x8d:
-            case 0x8e:
-            case 0x8f:
-
-            case 0x90:
-            case 0x91:
-            case 0x92:
-            case 0x93:
-            case 0x94:
-            case 0x95:
-            case 0x96:
-            case 0x97:
-            case 0x98:
-            case 0x99:
-            case 0x9a:
-            case 0x9b:
-            case 0x9c:
-            case 0x9d:
-            case 0x9e:
-            case 0x9f:
-
-            case 0xa0:
-            case 0xa1:
-            case 0xa2:
-            case 0xa3:
-            case 0xa4:
-            case 0xa5:
-            case 0xa6:
-            case 0xa7:
-            case 0xa8:
-            case 0xa9:
-            case 0xaa:
-            case 0xab:
-            case 0xac:
-            case 0xad:
-            case 0xae:
-            case 0xaf:
-
-            case 0xb0:
-            case 0xb1:
-            case 0xb2:
-            case 0xb3:
-            case 0xb4:
-            case 0xb5:
-            case 0xb6:
-            case 0xb7:
-            case 0xb8:
-            case 0xb9:
-            case 0xba:
-            case 0xbb:
-            case 0xbc:
-            case 0xbd:
-            case 0xbe:
-            case 0xbf:
-                return String.valueOf((tag - 0x90));
-
-      /* byte int */
-            case 0xc0:
-            case 0xc1:
-            case 0xc2:
-            case 0xc3:
-            case 0xc4:
-            case 0xc5:
-            case 0xc6:
-            case 0xc7:
-            case 0xc8:
-            case 0xc9:
-            case 0xca:
-            case 0xcb:
-            case 0xcc:
-            case 0xcd:
-            case 0xce:
-            case 0xcf:
-                return String.valueOf(((tag - BC_INT_BYTE_ZERO) << 8) + read());
-
-      /* short int */
-            case 0xd0:
-            case 0xd1:
-            case 0xd2:
-            case 0xd3:
-            case 0xd4:
-            case 0xd5:
-            case 0xd6:
-            case 0xd7:
-                return String.valueOf(((tag - BC_INT_SHORT_ZERO) << 16)
-                        + 256 * read() + read());
-
-            case 'I':
-            case BC_LONG_INT:
-                return String.valueOf(parseInt());
-
-            // direct long
-            case 0xd8:
-            case 0xd9:
-            case 0xda:
-            case 0xdb:
-            case 0xdc:
-            case 0xdd:
-            case 0xde:
-            case 0xdf:
-
-            case 0xe0:
-            case 0xe1:
-            case 0xe2:
-            case 0xe3:
-            case 0xe4:
-            case 0xe5:
-            case 0xe6:
-            case 0xe7:
-            case 0xe8:
-            case 0xe9:
-            case 0xea:
-            case 0xeb:
-            case 0xec:
-            case 0xed:
-            case 0xee:
-            case 0xef:
-                return String.valueOf(tag - BC_LONG_ZERO);
-
-      /* byte long */
-            case 0xf0:
-            case 0xf1:
-            case 0xf2:
-            case 0xf3:
-            case 0xf4:
-            case 0xf5:
-            case 0xf6:
-            case 0xf7:
-            case 0xf8:
-            case 0xf9:
-            case 0xfa:
-            case 0xfb:
-            case 0xfc:
-            case 0xfd:
-            case 0xfe:
-            case 0xff:
-                return String.valueOf(((tag - BC_LONG_BYTE_ZERO) << 8) + read());
-
-      /* short long */
-            case 0x38:
-            case 0x39:
-            case 0x3a:
-            case 0x3b:
-            case 0x3c:
-            case 0x3d:
-            case 0x3e:
-            case 0x3f:
-                return String.valueOf(((tag - BC_LONG_SHORT_ZERO) << 16)
-                        + 256 * read() + read());
-
-            case 'L':
-                return String.valueOf(parseLong());
-
-            case BC_DOUBLE_ZERO:
-                return "0.0";
-
-            case BC_DOUBLE_ONE:
-                return "1.0";
-
-            case BC_DOUBLE_BYTE:
-                return String.valueOf((byte) (_offset < _length
-                        ? _buffer[_offset++]
-                        : read()));
-
-            case BC_DOUBLE_SHORT:
-                return String.valueOf(((short) (256 * read() + read())));
-
-            case BC_DOUBLE_MILL: {
-                int mills = parseInt();
-
-                return String.valueOf(0.001 * mills);
-            }
-
-            case 'D':
-                return String.valueOf(parseDouble());
-
-            case 'S':
-            case BC_STRING_CHUNK:
-                _isLastChunk = tag == 'S';
-                _chunkLength = (read() << 8) + read();
-
-                _sbuf.setLength(0);
-                int ch;
-
-                while ((ch = parseChar()) >= 0)
-                    _sbuf.append((char) ch);
-
-                return _sbuf.toString();
-
-            // 0-byte string
-            case 0x00:
-            case 0x01:
-            case 0x02:
-            case 0x03:
-            case 0x04:
-            case 0x05:
-            case 0x06:
-            case 0x07:
-            case 0x08:
-            case 0x09:
-            case 0x0a:
-            case 0x0b:
-            case 0x0c:
-            case 0x0d:
-            case 0x0e:
-            case 0x0f:
-
-            case 0x10:
-            case 0x11:
-            case 0x12:
-            case 0x13:
-            case 0x14:
-            case 0x15:
-            case 0x16:
-            case 0x17:
-            case 0x18:
-            case 0x19:
-            case 0x1a:
-            case 0x1b:
-            case 0x1c:
-            case 0x1d:
-            case 0x1e:
-            case 0x1f:
-                _isLastChunk = true;
-                _chunkLength = tag - 0x00;
-
-                _sbuf.setLength(0);
-
-                while ((ch = parseChar()) >= 0)
-                    _sbuf.append((char) ch);
-
-                return _sbuf.toString();
-
-            case 0x30:
-            case 0x31:
-            case 0x32:
-            case 0x33:
-                _isLastChunk = true;
-                _chunkLength = (tag - 0x30) * 256 + read();
-
-                _sbuf.setLength(0);
-
-                while ((ch = parseChar()) >= 0)
-                    _sbuf.append((char) ch);
-
-                return _sbuf.toString();
-
-            default:
-                throw expect("string", tag);
-        }
-    }
-
-    /**
-     * Reads a byte array
-     * <p>
-     * <pre>
-     * B b16 b8 data value
-     * </pre>
-     */
-    @Override
-    public byte[] readBytes()
-            throws IOException {
-        int tag = read();
-
-        switch (tag) {
-            case 'N':
-                return null;
-
-            case 'B':
-            case BC_BINARY_CHUNK:
-                _isLastChunk = tag == 'B';
-                _chunkLength = (read() << 8) + read();
-
-                ByteArrayOutputStream bos = new ByteArrayOutputStream();
-
-                int data;
-                while ((data = parseByte()) >= 0)
-                    bos.write(data);
-
-                return bos.toByteArray();
-
-            case 0x20:
-            case 0x21:
-            case 0x22:
-            case 0x23:
-            case 0x24:
-            case 0x25:
-            case 0x26:
-            case 0x27:
-            case 0x28:
-            case 0x29:
-            case 0x2a:
-            case 0x2b:
-            case 0x2c:
-            case 0x2d:
-            case 0x2e:
-            case 0x2f: {
-                _isLastChunk = true;
-                _chunkLength = tag - 0x20;
-
-                byte[] buffer = new byte[_chunkLength];
-
-                int k = 0;
-                while ((data = parseByte()) >= 0)
-                    buffer[k++] = (byte) data;
-
-                return buffer;
-            }
-
-            case 0x34:
-            case 0x35:
-            case 0x36:
-            case 0x37: {
-                _isLastChunk = true;
-                _chunkLength = (tag - 0x34) * 256 + read();
-
-                byte[] buffer = new byte[_chunkLength];
-                int k = 0;
-
-                while ((data = parseByte()) >= 0) {
-                    buffer[k++] = (byte) data;
-                }
-
-                return buffer;
-            }
-
-            default:
-                throw expect("bytes", tag);
-        }
-    }
-
-    /**
-     * Reads a byte from the stream.
-     */
-    public int readByte()
-            throws IOException {
-        if (_chunkLength > 0) {
-            _chunkLength--;
-            if (_chunkLength == 0 && _isLastChunk)
-                _chunkLength = END_OF_DATA;
-
-            return read();
-        } else if (_chunkLength == END_OF_DATA) {
-            _chunkLength = 0;
-            return -1;
-        }
-
-        int tag = read();
-
-        switch (tag) {
-            case 'N':
-                return -1;
-
-            case 'B':
-            case BC_BINARY_CHUNK:
-                _isLastChunk = tag == 'B';
-                _chunkLength = (read() << 8) + read();
-
-                int value = parseByte();
-
-                // special code so successive read byte won't
-                // be read as a single object.
-                if (_chunkLength == 0 && _isLastChunk)
-                    _chunkLength = END_OF_DATA;
-
-                return value;
-
-            default:
-                throw expect("binary", tag);
-        }
-    }
-
-    /**
-     * Reads a byte array from the stream.
-     */
-    public int readBytes(byte[] buffer, int offset, int length)
-            throws IOException {
-        int readLength = 0;
-
-        if (_chunkLength == END_OF_DATA) {
-            _chunkLength = 0;
-            return -1;
-        } else if (_chunkLength == 0) {
-            int tag = read();
-
-            switch (tag) {
-                case 'N':
-                    return -1;
-
-                case 'B':
-                case BC_BINARY_CHUNK:
-                    _isLastChunk = tag == 'B';
-                    _chunkLength = (read() << 8) + read();
-                    break;
-
-                default:
-                    throw expect("binary", tag);
-            }
-        }
-
-        while (length > 0) {
-            if (_chunkLength > 0) {
-                buffer[offset++] = (byte) read();
-                _chunkLength--;
-                length--;
-                readLength++;
-            } else if (_isLastChunk) {
-                if (readLength == 0)
-                    return -1;
-                else {
-                    _chunkLength = END_OF_DATA;
-                    return readLength;
-                }
-            } else {
-                int tag = read();
-
-                switch (tag) {
-                    case 'B':
-                    case BC_BINARY_CHUNK:
-                        _isLastChunk = tag == 'B';
-                        _chunkLength = (read() << 8) + read();
-                        break;
-
-                    default:
-                        throw expect("binary", tag);
-                }
-            }
-        }
-
-        if (readLength == 0)
-            return -1;
-        else if (_chunkLength > 0 || !_isLastChunk)
-            return readLength;
-        else {
-            _chunkLength = END_OF_DATA;
-            return readLength;
-        }
-    }
-
-    /**
-     * Reads a fault.
-     */
-    private HashMap readFault()
-            throws IOException {
-        HashMap map = new HashMap();
-
-        int code = read();
-        for (; code > 0 && code != 'Z'; code = read()) {
-            _offset--;
-
-            Object key = readObject();
-            Object value = readObject();
-
-            if (key != null && value != null)
-                map.put(key, value);
-        }
-
-        if (code != 'Z')
-            throw expect("fault", code);
-
-        return map;
-    }
-
-    /**
-     * Reads an object from the input stream with an expected type.
-     */
-    @Override
-    public Object readObject(Class cl)
-            throws IOException {
-        return readObject(cl, null, null);
-    }
-
-    @Override
-    public Object readObject(Class expectedClass, Class<?>... expectedTypes) throws IOException {
-        if (expectedClass == null || expectedClass == Object.class)
-            return readObject();
-
-        int tag = _offset < _length ? (_buffer[_offset++] & 0xff) : read();
-
-        switch (tag) {
-            case 'N':
-                return null;
-
-            case 'H': {
-                Deserializer reader = findSerializerFactory().getDeserializer(expectedClass);
-
-                boolean keyValuePair = expectedTypes != null && expectedTypes.length == 2;
-                // fix deserialize of short type
-                return reader.readMap(this
-                        , keyValuePair ? expectedTypes[0] : null
-                        , keyValuePair ? expectedTypes[1] : null);
-            }
-
-            case 'M': {
-                String type = readType();
-
-                // hessian/3bb3
-                if ("".equals(type)) {
-                    Deserializer reader;
-                    reader = findSerializerFactory().getDeserializer(expectedClass);
-
-                    return reader.readMap(this);
-                } else {
-                    Deserializer reader;
-                    reader = findSerializerFactory().getObjectDeserializer(type, expectedClass);
-
-                    return reader.readMap(this);
-                }
-            }
-
-            case 'C': {
-                readObjectDefinition(expectedClass);
-
-                return readObject(expectedClass);
-            }
-
-            case 0x60:
-            case 0x61:
-            case 0x62:
-            case 0x63:
-            case 0x64:
-            case 0x65:
-            case 0x66:
-            case 0x67:
-            case 0x68:
-            case 0x69:
-            case 0x6a:
-            case 0x6b:
-            case 0x6c:
-            case 0x6d:
-            case 0x6e:
-            case 0x6f: {
-                int ref = tag - 0x60;
-                int size = _classDefs.size();
-
-                if (ref < 0 || size <= ref)
-                    throw new HessianProtocolException("'" + ref + "' is an unknown class definition");
-
-                ObjectDefinition def = (ObjectDefinition) _classDefs.get(ref);
-
-                return readObjectInstance(expectedClass, def);
-            }
-
-            case 'O': {
-                int ref = readInt();
-                int size = _classDefs.size();
-
-                if (ref < 0 || size <= ref)
-                    throw new HessianProtocolException("'" + ref + "' is an unknown class definition");
-
-                ObjectDefinition def = (ObjectDefinition) _classDefs.get(ref);
-
-                return readObjectInstance(expectedClass, def);
-            }
-
-            case BC_LIST_VARIABLE: {
-                String type = readType();
-
-                Deserializer reader;
-                reader = findSerializerFactory().getListDeserializer(type, expectedClass);
-
-                Object v = reader.readList(this, -1);
-
-                return v;
-            }
-
-            case BC_LIST_FIXED: {
-                String type = readType();
-                int length = readInt();
-
-                Deserializer reader;
-                reader = findSerializerFactory().getListDeserializer(type, expectedClass);
-
-                boolean valueType = expectedTypes != null && expectedTypes.length == 1;
-
-                Object v = reader.readLengthList(this, length, valueType ? expectedTypes[0] : null);
-
-                return v;
-            }
-
-            case 0x70:
-            case 0x71:
-            case 0x72:
-            case 0x73:
-            case 0x74:
-            case 0x75:
-            case 0x76:
-            case 0x77: {
-                int length = tag - 0x70;
-
-                String type = readType();
-
-                Deserializer reader;
-                reader = findSerializerFactory().getListDeserializer(null, expectedClass);
-
-                boolean valueType = expectedTypes != null && expectedTypes.length == 1;
-
-                // fix deserialize of short type
-                Object v = reader.readLengthList(this, length, valueType ? expectedTypes[0] : null);
-
-                return v;
-            }
-
-            case BC_LIST_VARIABLE_UNTYPED: {
-                Deserializer reader;
-                reader = findSerializerFactory().getListDeserializer(null, expectedClass);
-
-                boolean valueType = expectedTypes != null && expectedTypes.length == 1;
-
-                // fix deserialize of short type
-                Object v = reader.readList(this, -1, valueType ? expectedTypes[0] : null);
-
-                return v;
-            }
-
-            case BC_LIST_FIXED_UNTYPED: {
-                int length = readInt();
-
-                Deserializer reader;
-                reader = findSerializerFactory().getListDeserializer(null, expectedClass);
-
-                boolean valueType = expectedTypes != null && expectedTypes.length == 1;
-
-                // fix deserialize of short type
-                Object v = reader.readLengthList(this, length, valueType ? expectedTypes[0] : null);
-
-                return v;
-            }
-
-            case 0x78:
-            case 0x79:
-            case 0x7a:
-            case 0x7b:
-            case 0x7c:
-            case 0x7d:
-            case 0x7e:
-            case 0x7f: {
-                int length = tag - 0x78;
-
-                Deserializer reader;
-                reader = findSerializerFactory().getListDeserializer(null, expectedClass);
-
-                boolean valueType = expectedTypes != null && expectedTypes.length == 1;
-
-                // fix deserialize of short type
-                Object v = reader.readLengthList(this, length, valueType ? expectedTypes[0] : null);
-
-                return v;
-            }
-
-            case BC_REF: {
-                int ref = readInt();
-
-                return _refs.get(ref);
-            }
-        }
-
-        if (tag >= 0)
-            _offset--;
-
-        // hessian/3b2i vs hessian/3406
-        // return readObject();
-        Object value = findSerializerFactory().getDeserializer(expectedClass).readObject(this);
-        return value;
-    }
-
-    /**
-     * Reads an arbitrary object from the input stream when the type
-     * is unknown.
-     */
-    @Override
-    public Object readObject()
-            throws IOException {
-        return readObject((List<Class<?>>) null);
-    }
-
-    @Override
-    public Object readObject(List<Class<?>> expectedTypes) throws IOException {
-        int tag = _offset < _length ? (_buffer[_offset++] & 0xff) : read();
-
-        switch (tag) {
-            case 'N':
-                return null;
-
-            case 'T':
-                return Boolean.valueOf(true);
-
-            case 'F':
-                return Boolean.valueOf(false);
-
-            // direct integer
-            case 0x80:
-            case 0x81:
-            case 0x82:
-            case 0x83:
-            case 0x84:
-            case 0x85:
-            case 0x86:
-            case 0x87:
-            case 0x88:
-            case 0x89:
-            case 0x8a:
-            case 0x8b:
-            case 0x8c:
-            case 0x8d:
-            case 0x8e:
-            case 0x8f:
-
-            case 0x90:
-            case 0x91:
-            case 0x92:
-            case 0x93:
-            case 0x94:
-            case 0x95:
-            case 0x96:
-            case 0x97:
-            case 0x98:
-            case 0x99:
-            case 0x9a:
-            case 0x9b:
-            case 0x9c:
-            case 0x9d:
-            case 0x9e:
-            case 0x9f:
-
-            case 0xa0:
-            case 0xa1:
-            case 0xa2:
-            case 0xa3:
-            case 0xa4:
-            case 0xa5:
-            case 0xa6:
-            case 0xa7:
-            case 0xa8:
-            case 0xa9:
-            case 0xaa:
-            case 0xab:
-            case 0xac:
-            case 0xad:
-            case 0xae:
-            case 0xaf:
-
-            case 0xb0:
-            case 0xb1:
-            case 0xb2:
-            case 0xb3:
-            case 0xb4:
-            case 0xb5:
-            case 0xb6:
-            case 0xb7:
-            case 0xb8:
-            case 0xb9:
-            case 0xba:
-            case 0xbb:
-            case 0xbc:
-            case 0xbd:
-            case 0xbe:
-            case 0xbf:
-                return Integer.valueOf(tag - BC_INT_ZERO);
-
-            /* byte int */
-            case 0xc0:
-            case 0xc1:
-            case 0xc2:
-            case 0xc3:
-            case 0xc4:
-            case 0xc5:
-            case 0xc6:
-            case 0xc7:
-            case 0xc8:
-            case 0xc9:
-            case 0xca:
-            case 0xcb:
-            case 0xcc:
-            case 0xcd:
-            case 0xce:
-            case 0xcf:
-                return Integer.valueOf(((tag - BC_INT_BYTE_ZERO) << 8) + read());
-
-            /* short int */
-            case 0xd0:
-            case 0xd1:
-            case 0xd2:
-            case 0xd3:
-            case 0xd4:
-            case 0xd5:
-            case 0xd6:
-            case 0xd7:
-                return Integer.valueOf(((tag - BC_INT_SHORT_ZERO) << 16)
-                        + 256 * read() + read());
-
-            case 'I':
-                return Integer.valueOf(parseInt());
-
-            // direct long
-            case 0xd8:
-            case 0xd9:
-            case 0xda:
-            case 0xdb:
-            case 0xdc:
-            case 0xdd:
-            case 0xde:
-            case 0xdf:
-
-            case 0xe0:
-            case 0xe1:
-            case 0xe2:
-            case 0xe3:
-            case 0xe4:
-            case 0xe5:
-            case 0xe6:
-            case 0xe7:
-            case 0xe8:
-            case 0xe9:
-            case 0xea:
-            case 0xeb:
-            case 0xec:
-            case 0xed:
-            case 0xee:
-            case 0xef:
-                return Long.valueOf(tag - BC_LONG_ZERO);
-
-            /* byte long */
-            case 0xf0:
-            case 0xf1:
-            case 0xf2:
-            case 0xf3:
-            case 0xf4:
-            case 0xf5:
-            case 0xf6:
-            case 0xf7:
-            case 0xf8:
-            case 0xf9:
-            case 0xfa:
-            case 0xfb:
-            case 0xfc:
-            case 0xfd:
-            case 0xfe:
-            case 0xff:
-                return Long.valueOf(((tag - BC_LONG_BYTE_ZERO) << 8) + read());
-
-            /* short long */
-            case 0x38:
-            case 0x39:
-            case 0x3a:
-            case 0x3b:
-            case 0x3c:
-            case 0x3d:
-            case 0x3e:
-            case 0x3f:
-                return Long.valueOf(((tag - BC_LONG_SHORT_ZERO) << 16) + 256 * read() + read());
-
-            case BC_LONG_INT:
-                return Long.valueOf(parseInt());
-
-            case 'L':
-                return Long.valueOf(parseLong());
-
-            case BC_DOUBLE_ZERO:
-                return Double.valueOf(0);
-
-            case BC_DOUBLE_ONE:
-                return Double.valueOf(1);
-
-            case BC_DOUBLE_BYTE:
-                return Double.valueOf((byte) read());
-
-            case BC_DOUBLE_SHORT:
-                return Double.valueOf((short) (256 * read() + read()));
-
-            case BC_DOUBLE_MILL: {
-                int mills = parseInt();
-
-                return Double.valueOf(0.001 * mills);
-            }
-
-            case 'D':
-                return Double.valueOf(parseDouble());
-
-            case BC_DATE:
-                return new Date(parseLong());
-
-            case BC_DATE_MINUTE:
-                return new Date(parseInt() * 60000L);
-
-            case BC_STRING_CHUNK:
-            case 'S': {
-                _isLastChunk = tag == 'S';
-                _chunkLength = (read() << 8) + read();
-
-                _sbuf.setLength(0);
-
-                parseString(_sbuf);
-
-                return _sbuf.toString();
-            }
-
-            case 0x00:
-            case 0x01:
-            case 0x02:
-            case 0x03:
-            case 0x04:
-            case 0x05:
-            case 0x06:
-            case 0x07:
-            case 0x08:
-            case 0x09:
-            case 0x0a:
-            case 0x0b:
-            case 0x0c:
-            case 0x0d:
-            case 0x0e:
-            case 0x0f:
-
-            case 0x10:
-            case 0x11:
-            case 0x12:
-            case 0x13:
-            case 0x14:
-            case 0x15:
-            case 0x16:
-            case 0x17:
-            case 0x18:
-            case 0x19:
-            case 0x1a:
-            case 0x1b:
-            case 0x1c:
-            case 0x1d:
-            case 0x1e:
-            case 0x1f: {
-                _isLastChunk = true;
-                _chunkLength = tag - 0x00;
-
-                _sbuf.setLength(0);
-
-                parseString(_sbuf);
-
-                return _sbuf.toString();
-            }
-
-            case 0x30:
-            case 0x31:
-            case 0x32:
-            case 0x33: {
-                _isLastChunk = true;
-                _chunkLength = (tag - 0x30) * 256 + read();
-
-                _sbuf.setLength(0);
-
-                parseString(_sbuf);
-
-                return _sbuf.toString();
-            }
-
-            case BC_BINARY_CHUNK:
-            case 'B': {
-                _isLastChunk = tag == 'B';
-                _chunkLength = (read() << 8) + read();
-
-                int data;
-                ByteArrayOutputStream bos = new ByteArrayOutputStream();
-
-                while ((data = parseByte()) >= 0)
-                    bos.write(data);
-
-                return bos.toByteArray();
-            }
-
-            case 0x20:
-            case 0x21:
-            case 0x22:
-            case 0x23:
-            case 0x24:
-            case 0x25:
-            case 0x26:
-            case 0x27:
-            case 0x28:
-            case 0x29:
-            case 0x2a:
-            case 0x2b:
-            case 0x2c:
-            case 0x2d:
-            case 0x2e:
-            case 0x2f: {
-                _isLastChunk = true;
-                int len = tag - 0x20;
-                _chunkLength = 0;
-
-                byte[] data = new byte[len];
-
-                for (int i = 0; i < len; i++)
-                    data[i] = (byte) read();
-
-                return data;
-            }
-
-            case 0x34:
-            case 0x35:
-            case 0x36:
-            case 0x37: {
-                _isLastChunk = true;
-                int len = (tag - 0x34) * 256 + read();
-                _chunkLength = 0;
-
-                byte[] buffer = new byte[len];
-
-                for (int i = 0; i < len; i++) {
-                    buffer[i] = (byte) read();
-                }
-
-                return buffer;
-            }
-
-            case BC_LIST_VARIABLE: {
-                // variable length list
-                String type = readType();
-
-                return findSerializerFactory().readList(this, -1, type);
-            }
-
-            case BC_LIST_VARIABLE_UNTYPED: {
-                return findSerializerFactory().readList(this, -1, null);
-            }
-
-            case BC_LIST_FIXED: {
-                // fixed length lists
-                String type = readType();
-                int length = readInt();
-
-                Deserializer reader;
-                reader = findSerializerFactory().getListDeserializer(type, null);
-
-                boolean valueType = expectedTypes != null && expectedTypes.size() == 1;
-
-                return reader.readLengthList(this, length, valueType ? expectedTypes.get(0) : null);
-            }
-
-            case BC_LIST_FIXED_UNTYPED: {
-                // fixed length lists
-                int length = readInt();
-
-                Deserializer reader;
-                reader = findSerializerFactory().getListDeserializer(null, null);
-
-                boolean valueType = expectedTypes != null && expectedTypes.size() == 1;
-
-                return reader.readLengthList(this, length, valueType ? expectedTypes.get(0) : null);
-            }
-
-            // compact fixed list
-            case 0x70:
-            case 0x71:
-            case 0x72:
-            case 0x73:
-            case 0x74:
-            case 0x75:
-            case 0x76:
-            case 0x77: {
-                // fixed length lists
-                String type = readType();
-                int length = tag - 0x70;
-
-                Deserializer reader;
-                reader = findSerializerFactory().getListDeserializer(type, null);
-
-                boolean valueType = expectedTypes != null && expectedTypes.size() == 1;
-
-                return reader.readLengthList(this, length, valueType ? expectedTypes.get(0) : null);
-            }
-
-            // compact fixed untyped list
-            case 0x78:
-            case 0x79:
-            case 0x7a:
-            case 0x7b:
-            case 0x7c:
-            case 0x7d:
-            case 0x7e:
-            case 0x7f: {
-                // fixed length lists
-                int length = tag - 0x78;
-
-                Deserializer reader;
-                reader = findSerializerFactory().getListDeserializer(null, null);
-
-                boolean valueType = expectedTypes != null && expectedTypes.size() == 1;
-
-                return reader.readLengthList(this, length, valueType ? expectedTypes.get(0) : null);
-            }
-
-            case 'H': {
-
-                boolean keyValuePair = expectedTypes != null && expectedTypes.size() == 2;
-
-                // fix deserialize of short type
-                Deserializer reader;
-                reader = findSerializerFactory().getDeserializer(Map.class);
-
-                return reader.readMap(this
-                        , keyValuePair ? expectedTypes.get(0) : null
-                        , keyValuePair ? expectedTypes.get(1) : null);
-            }
-
-            case 'M': {
-                String type = readType();
-
-                return findSerializerFactory().readMap(this, type);
-            }
-
-            case 'C': {
-                readObjectDefinition(null);
-
-                return readObject();
-            }
-
-            case 0x60:
-            case 0x61:
-            case 0x62:
-            case 0x63:
-            case 0x64:
-            case 0x65:
-            case 0x66:
-            case 0x67:
-            case 0x68:
-            case 0x69:
-            case 0x6a:
-            case 0x6b:
-            case 0x6c:
-            case 0x6d:
-            case 0x6e:
-            case 0x6f: {
-                int ref = tag - 0x60;
-
-                if (_classDefs == null)
-                    throw error("No classes defined at reference '{0}'" + tag);
-
-                ObjectDefinition def = (ObjectDefinition) _classDefs.get(ref);
-
-                return readObjectInstance(null, def);
-            }
-
-            case 'O': {
-                int ref = readInt();
-
-                ObjectDefinition def = (ObjectDefinition) _classDefs.get(ref);
-
-                return readObjectInstance(null, def);
-            }
-
-            case BC_REF: {
-                int ref = readInt();
-
-                return _refs.get(ref);
-            }
-
-            default:
-                if (tag < 0)
-                    throw new EOFException("readObject: unexpected end of file");
-                else
-                    throw error("readObject: unknown code " + codeName(tag));
-        }
-    }
-
-    private void parseString(StringBuilder sbuf)
-            throws IOException {
-        while (true) {
-            if (_chunkLength <= 0) {
-                if (!parseChunkLength())
-                    return;
-            }
-
-            int length = _chunkLength;
-            _chunkLength = 0;
-
-            while (length-- > 0) {
-                sbuf.append((char) parseUTF8Char());
-            }
-        }
-    }
-
-    /**
-     * Reads an object definition:
-     * <p>
-     * <pre>
-     * O string <int> (string)* <value>*
-     * </pre>
-     */
-    private void readObjectDefinition(Class cl)
-            throws IOException {
-        String type = readString();
-        int len = readInt();
-
-        String[] fieldNames = new String[len];
-        for (int i = 0; i < len; i++)
-            fieldNames[i] = readString();
-
-        ObjectDefinition def = new ObjectDefinition(type, fieldNames);
-
-        if (_classDefs == null)
-            _classDefs = new ArrayList();
-
-        _classDefs.add(def);
-    }
-
-    private Object readObjectInstance(Class cl, ObjectDefinition def)
-            throws IOException {
-        String type = def.getType();
-        String[] fieldNames = def.getFieldNames();
-
-        if (cl != null) {
-            Deserializer reader;
-            reader = findSerializerFactory().getObjectDeserializer(type, cl);
-
-            return reader.readObject(this, fieldNames);
-        } else {
-            return findSerializerFactory().readObject(this, type, fieldNames);
-        }
-    }
-
-    private String readLenString()
-            throws IOException {
-        int len = readInt();
-
-        _isLastChunk = true;
-        _chunkLength = len;
-
-        _sbuf.setLength(0);
-        int ch;
-        while ((ch = parseChar()) >= 0)
-            _sbuf.append((char) ch);
-
-        return _sbuf.toString();
-    }
-
-    private String readLenString(int len)
-            throws IOException {
-        _isLastChunk = true;
-        _chunkLength = len;
-
-        _sbuf.setLength(0);
-        int ch;
-        while ((ch = parseChar()) >= 0)
-            _sbuf.append((char) ch);
-
-        return _sbuf.toString();
-    }
-
-    /**
-     * Reads a remote object.
-     */
-    @Override
-    public Object readRemote()
-            throws IOException {
-        String type = readType();
-        String url = readString();
-
-        return resolveRemote(type, url);
-    }
-
-    /**
-     * Reads a reference.
-     */
-    @Override
-    public Object readRef()
-            throws IOException {
-        return _refs.get(parseInt());
-    }
-
-    /**
-     * Reads the start of a list.
-     */
-    @Override
-    public int readListStart()
-            throws IOException {
-        return read();
-    }
-
-    /**
-     * Reads the start of a list.
-     */
-    @Override
-    public int readMapStart()
-            throws IOException {
-        return read();
-    }
-
-    /**
-     * Returns true if this is the end of a list or a map.
-     */
-    @Override
-    public boolean isEnd()
-            throws IOException {
-        int code;
-
-        if (_offset < _length)
-            code = (_buffer[_offset] & 0xff);
-        else {
-            code = read();
-
-            if (code >= 0)
-                _offset--;
-        }
-
-        return (code < 0 || code == 'Z');
-    }
-
-    /**
-     * Reads the end byte.
-     */
-    @Override
-    public void readEnd()
-            throws IOException {
-        int code = _offset < _length ? (_buffer[_offset++] & 0xff) : read();
-
-        if (code == 'Z')
-            return;
-        else if (code < 0)
-            throw error("unexpected end of file");
-        else
-            throw error("unknown code:" + codeName(code));
-    }
-
-    /**
-     * Reads the end byte.
-     */
-    @Override
-    public void readMapEnd()
-            throws IOException {
-        int code = _offset < _length ? (_buffer[_offset++] & 0xff) : read();
-
-        if (code != 'Z')
-            throw error("expected end of map ('Z') at '" + codeName(code) + "'");
-    }
-
-    /**
-     * Reads the end byte.
-     */
-    @Override
-    public void readListEnd()
-            throws IOException {
-        int code = _offset < _length ? (_buffer[_offset++] & 0xff) : read();
-
-        if (code != 'Z')
-            throw error("expected end of list ('Z') at '" + codeName(code) + "'");
-    }
-
-    /**
-     * Adds a list/map reference.
-     */
-    @Override
-    public int addRef(Object ref) {
-        if (_refs == null)
-            _refs = new ArrayList();
-
-        _refs.add(ref);
-
-        return _refs.size() - 1;
-    }
-
-    /**
-     * Adds a list/map reference.
-     */
-    @Override
-    public void setRef(int i, Object ref) {
-        _refs.set(i, ref);
-    }
-
-    /**
-     * Resets the references for streaming.
-     */
-    @Override
-    public void resetReferences() {
-        if (_refs != null)
-            _refs.clear();
-    }
-
-    public Object readStreamingObject()
-            throws IOException {
-        if (_refs != null)
-            _refs.clear();
-
-        return readObject();
-    }
-
-    /**
-     * Resolves a remote object.
-     */
-    public Object resolveRemote(String type, String url)
-            throws IOException {
-        HessianRemoteResolver resolver = getRemoteResolver();
-
-        if (resolver != null)
-            return resolver.lookup(type, url);
-        else
-            return new HessianRemote(type, url);
-    }
-
-    /**
-     * Parses a type from the stream.
-     * <p>
-     * <pre>
-     * type ::= string
-     * type ::= int
-     * </pre>
-     */
-    @Override
-    public String readType()
-            throws IOException {
-        int code = _offset < _length ? (_buffer[_offset++] & 0xff) : read();
-        _offset--;
-
-        switch (code) {
-            case 0x00:
-            case 0x01:
-            case 0x02:
-            case 0x03:
-            case 0x04:
-            case 0x05:
-            case 0x06:
-            case 0x07:
-            case 0x08:
-            case 0x09:
-            case 0x0a:
-            case 0x0b:
-            case 0x0c:
-            case 0x0d:
-            case 0x0e:
-            case 0x0f:
-
-            case 0x10:
-            case 0x11:
-            case 0x12:
-            case 0x13:
-            case 0x14:
-            case 0x15:
-            case 0x16:
-            case 0x17:
-            case 0x18:
-            case 0x19:
-            case 0x1a:
-            case 0x1b:
-            case 0x1c:
-            case 0x1d:
-            case 0x1e:
-            case 0x1f:
-
-            case 0x30:
-            case 0x31:
-            case 0x32:
-            case 0x33:
-            case BC_STRING_CHUNK:
-            case 'S': {
-                String type = readString();
-
-                if (_types == null)
-                    _types = new ArrayList();
-
-                _types.add(type);
-
-                return type;
-            }
-
-            default: {
-                int ref = readInt();
-
-                if (_types.size() <= ref)
-                    throw new IndexOutOfBoundsException("type ref #" + ref + " is greater than the number of valid types (" + _types.size() + ")");
-
-                return (String) _types.get(ref);
-            }
-        }
-    }
-
-    /**
-     * Parses the length for an array
-     * <p>
-     * <pre>
-     * l b32 b24 b16 b8
-     * </pre>
-     */
-    @Override
-    public int readLength()
-            throws IOException {
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * Parses a 32-bit integer value from the stream.
-     * <p>
-     * <pre>
-     * b32 b24 b16 b8
-     * </pre>
-     */
-    private int parseInt()
-            throws IOException {
-        int offset = _offset;
-
-        if (offset + 3 < _length) {
-            byte[] buffer = _buffer;
-
-            int b32 = buffer[offset + 0] & 0xff;
-            int b24 = buffer[offset + 1] & 0xff;
-            int b16 = buffer[offset + 2] & 0xff;
-            int b8 = buffer[offset + 3] & 0xff;
-
-            _offset = offset + 4;
-
-            return (b32 << 24) + (b24 << 16) + (b16 << 8) + b8;
-        } else {
-            int b32 = read();
-            int b24 = read();
-            int b16 = read();
-            int b8 = read();
-
-            return (b32 << 24) + (b24 << 16) + (b16 << 8) + b8;
-        }
-    }
-
-    /**
-     * Parses a 64-bit long value from the stream.
-     * <p>
-     * <pre>
-     * b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre>
-     */
-    private long parseLong()
-            throws IOException {
-        long b64 = read();
-        long b56 = read();
-        long b48 = read();
-        long b40 = read();
-        long b32 = read();
-        long b24 = read();
-        long b16 = read();
-        long b8 = read();
-
-        return ((b64 << 56)
-                + (b56 << 48)
-                + (b48 << 40)
-                + (b40 << 32)
-                + (b32 << 24)
-                + (b24 << 16)
-                + (b16 << 8)
-                + b8);
-    }
-
-    /**
-     * Parses a 64-bit double value from the stream.
-     * <p>
-     * <pre>
-     * b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre>
-     */
-    private double parseDouble()
-            throws IOException {
-        long bits = parseLong();
-
-        return Double.longBitsToDouble(bits);
-    }
-
-    org.w3c.dom.Node parseXML()
-            throws IOException {
-        throw new UnsupportedOperationException();
-    }
-
-    private boolean parseChunkLength()
-            throws IOException {
-        if (_isLastChunk)
-            return false;
-
-        int code = _offset < _length ? (_buffer[_offset++] & 0xff) : read();
-
-        switch (code) {
-            case BC_STRING_CHUNK:
-                _isLastChunk = false;
-
-                _chunkLength = (read() << 8) + read();
-                break;
-
-            case 'S':
-                _isLastChunk = true;
-
-                _chunkLength = (read() << 8) + read();
-                break;
-
-            case 0x00:
-            case 0x01:
-            case 0x02:
-            case 0x03:
-            case 0x04:
-            case 0x05:
-            case 0x06:
-            case 0x07:
-            case 0x08:
-            case 0x09:
-            case 0x0a:
-            case 0x0b:
-            case 0x0c:
-            case 0x0d:
-            case 0x0e:
-            case 0x0f:
-
-            case 0x10:
-            case 0x11:
-            case 0x12:
-            case 0x13:
-            case 0x14:
-            case 0x15:
-            case 0x16:
-            case 0x17:
-            case 0x18:
-            case 0x19:
-            case 0x1a:
-            case 0x1b:
-            case 0x1c:
-            case 0x1d:
-            case 0x1e:
-            case 0x1f:
-                _isLastChunk = true;
-                _chunkLength = code - 0x00;
-                break;
-
-            case 0x30:
-            case 0x31:
-            case 0x32:
-            case 0x33:
-                _isLastChunk = true;
-                _chunkLength = (code - 0x30) * 256 + read();
-                break;
-
-            default:
-                throw expect("string", code);
-        }
-
-        return true;
-    }
-
-    /**
-     * Reads a character from the underlying stream.
-     */
-    private int parseChar()
-            throws IOException {
-        while (_chunkLength <= 0) {
-            if (!parseChunkLength())
-                return -1;
-        }
-
-        _chunkLength--;
-
-        return parseUTF8Char();
-    }
-
-    /**
-     * Parses a single UTF8 character.
-     */
-    private int parseUTF8Char()
-            throws IOException {
-        int ch = _offset < _length ? (_buffer[_offset++] & 0xff) : read();
-
-        if (ch < 0x80)
-            return ch;
-        else if ((ch & 0xe0) == 0xc0) {
-            int ch1 = read();
-            int v = ((ch & 0x1f) << 6) + (ch1 & 0x3f);
-
-            return v;
-        } else if ((ch & 0xf0) == 0xe0) {
-            int ch1 = read();
-            int ch2 = read();
-            int v = ((ch & 0x0f) << 12) + ((ch1 & 0x3f) << 6) + (ch2 & 0x3f);
-
-            return v;
-        } else
-            throw error("bad utf-8 encoding at " + codeName(ch));
-    }
-
-    /**
-     * Reads a byte from the underlying stream.
-     */
-    private int parseByte()
-            throws IOException {
-        while (_chunkLength <= 0) {
-            if (_isLastChunk) {
-                return -1;
-            }
-
-            int code = read();
-
-            switch (code) {
-                case BC_BINARY_CHUNK:
-                    _isLastChunk = false;
-
-                    _chunkLength = (read() << 8) + read();
-                    break;
-
-                case 'B':
-                    _isLastChunk = true;
-
-                    _chunkLength = (read() << 8) + read();
-                    break;
-
-                case 0x20:
-                case 0x21:
-                case 0x22:
-                case 0x23:
-                case 0x24:
-                case 0x25:
-                case 0x26:
-                case 0x27:
-                case 0x28:
-                case 0x29:
-                case 0x2a:
-                case 0x2b:
-                case 0x2c:
-                case 0x2d:
-                case 0x2e:
-                case 0x2f:
-                    _isLastChunk = true;
-
-                    _chunkLength = code - 0x20;
-                    break;
-
-                case 0x34:
-                case 0x35:
-                case 0x36:
-                case 0x37:
-                    _isLastChunk = true;
-                    _chunkLength = (code - 0x34) * 256 + read();
-                    break;
-
-                default:
-                    throw expect("byte[]", code);
-            }
-        }
-
-        _chunkLength--;
-
-        return read();
-    }
-
-    /**
-     * Reads bytes based on an input stream.
-     */
-    @Override
-    public InputStream readInputStream()
-            throws IOException {
-        int tag = read();
-
-        switch (tag) {
-            case 'N':
-                return null;
-
-            case 'B':
-            case 'b':
-                _isLastChunk = tag == 'B';
-                _chunkLength = (read() << 8) + read();
-                break;
-
-            case 0x20:
-            case 0x21:
-            case 0x22:
-            case 0x23:
-            case 0x24:
-            case 0x25:
-            case 0x26:
-            case 0x27:
-            case 0x28:
-            case 0x29:
-            case 0x2a:
-            case 0x2b:
-            case 0x2c:
-            case 0x2d:
-            case 0x2e:
-            case 0x2f:
-                _isLastChunk = true;
-                _chunkLength = tag - 0x20;
-                break;
-
-            default:
-                throw expect("binary", tag);
-        }
-
-        return new ReadInputStream();
-    }
-
-    /**
-     * Reads bytes from the underlying stream.
-     */
-    int read(byte[] buffer, int offset, int length)
-            throws IOException {
-        int readLength = 0;
-
-        while (length > 0) {
-            while (_chunkLength <= 0) {
-                if (_isLastChunk)
-                    return readLength == 0 ? -1 : readLength;
-
-                int code = read();
-
-                switch (code) {
-                    case 'b':
-                        _isLastChunk = false;
-
-                        _chunkLength = (read() << 8) + read();
-                        break;
-
-                    case 'B':
-                        _isLastChunk = true;
-
-                        _chunkLength = (read() << 8) + read();
-                        break;
-
-                    case 0x20:
-                    case 0x21:
-                    case 0x22:
-                    case 0x23:
-                    case 0x24:
-                    case 0x25:
-                    case 0x26:
-                    case 0x27:
-                    case 0x28:
-                    case 0x29:
-                    case 0x2a:
-                    case 0x2b:
-                    case 0x2c:
-                    case 0x2d:
-                    case 0x2e:
-                    case 0x2f:
-                        _isLastChunk = true;
-                        _chunkLength = code - 0x20;
-                        break;
-
-                    default:
-                        throw expect("byte[]", code);
-                }
-            }
-
-            int sublen = _chunkLength;
-            if (length < sublen)
-                sublen = length;
-
-            if (_length <= _offset && !readBuffer())
-                return -1;
-
-            if (_length - _offset < sublen)
-                sublen = _length - _offset;
-
-            System.arraycopy(_buffer, _offset, buffer, offset, sublen);
-
-            _offset += sublen;
-
-            offset += sublen;
-            readLength += sublen;
-            length -= sublen;
-            _chunkLength -= sublen;
-        }
-
-        return readLength;
-    }
-
-    /**
-     * Normally, shouldn't be called externally, but needed for QA, e.g.
-     * ejb/3b01.
-     */
-    public final int read()
-            throws IOException {
-        if (_length <= _offset && !readBuffer())
-            return -1;
-
-        return _buffer[_offset++] & 0xff;
-    }
-
-    private final boolean readBuffer()
-            throws IOException {
-        byte[] buffer = _buffer;
-        int offset = _offset;
-        int length = _length;
-
-        if (offset < length) {
-            System.arraycopy(buffer, offset, buffer, 0, length - offset);
-            offset = length - offset;
-        } else
-            offset = 0;
-
-        int len = _is.read(buffer, offset, SIZE - offset);
-
-        if (len <= 0) {
-            _length = offset;
-            _offset = 0;
-
-            return offset > 0;
-        }
-
-        _length = offset + len;
-        _offset = 0;
-
-        return true;
-    }
-
-    @Override
-    public Reader getReader() {
-        return null;
-    }
-
-    protected IOException expect(String expect, int ch)
-            throws IOException {
-        if (ch < 0)
-            return error("expected " + expect + " at end of file");
-        else {
-            _offset--;
-
-            try {
-                Object obj = readObject();
-
-                if (obj != null) {
-                    return error("expected " + expect
-                            + " at 0x" + Integer.toHexString(ch & 0xff)
-                            + " " + obj.getClass().getName() + " (" + obj + ")");
-                } else
-                    return error("expected " + expect
-                            + " at 0x" + Integer.toHexString(ch & 0xff) + " null");
-            } catch (IOException e) {
-                log.log(Level.FINE, e.toString(), e);
-
-                return error("expected " + expect
-                        + " at 0x" + Integer.toHexString(ch & 0xff));
-            }
-        }
-    }
-
-    protected String codeName(int ch) {
-        if (ch < 0)
-            return "end of file";
-        else
-            return "0x" + Integer.toHexString(ch & 0xff) + " (" + (char) +ch + ")";
-    }
-
-    protected IOException error(String message) {
-        if (_method != null)
-            return new HessianProtocolException(_method + ": " + message);
-        else
-            return new HessianProtocolException(message);
-    }
-
-    @Override
-    public void close()
-            throws IOException {
-        InputStream is = _is;
-        _is = null;
-
-        if (_isCloseStreamOnClose && is != null)
-            is.close();
-    }
-
-    ;
-
-    final static class ObjectDefinition {
-        private final String _type;
-        private final String[] _fields;
-
-        ObjectDefinition(String type, String[] fields) {
-            _type = type;
-            _fields = fields;
-        }
-
-        String getType() {
-            return _type;
-        }
-
-        String[] getFieldNames() {
-            return _fields;
-        }
-    }
-
-    class ReadInputStream extends InputStream {
-        boolean _isClosed = false;
-
-        @Override
-        public int read()
-                throws IOException {
-            if (_isClosed)
-                return -1;
-
-            int ch = parseByte();
-            if (ch < 0)
-                _isClosed = true;
-
-            return ch;
-        }
-
-        @Override
-        public int read(byte[] buffer, int offset, int length)
-                throws IOException {
-            if (_isClosed)
-                return -1;
-
-            int len = Hessian2Input.this.read(buffer, offset, length);
-            if (len < 0)
-                _isClosed = true;
-
-            return len;
-        }
-
-        @Override
-        public void close()
-                throws IOException {
-            while (read() >= 0) {
-            }
-        }
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2Output.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2Output.java
deleted file mode 100644
index 3eb98b577b..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2Output.java
+++ /dev/null
@@ -1,1537 +0,0 @@
-/*
- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import com.alibaba.com.caucho.hessian.util.IdentityIntMap;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.HashMap;
-
-/**
- * Output stream for Hessian 2 requests.
- * <p>
- * <p>Since HessianOutput does not depend on any classes other than
- * in the JDK, it can be extracted independently into a smaller package.
- * <p>
- * <p>HessianOutput is unbuffered, so any client needs to provide
- * its own buffering.
- * <p>
- * <pre>
- * OutputStream os = ...; // from http connection
- * Hessian2Output out = new Hessian2Output(os);
- * String value;
- *
- * out.startCall("hello", 1); // start hello call
- * out.writeString("arg1");   // write a string argument
- * out.completeCall();        // complete the call
- * </pre>
- */
-public class Hessian2Output
-        extends AbstractHessianOutput
-        implements Hessian2Constants {
-    public final static int SIZE = 4096;
-    private final byte[] _buffer = new byte[SIZE];
-    // the output stream/
-    protected OutputStream _os;
-    // map of references
-    private IdentityIntMap _refs = new IdentityIntMap();
-    private boolean _isCloseStreamOnClose;
-    // map of classes
-    private HashMap _classRefs;
-    // map of types
-    private HashMap _typeRefs;
-    private int _offset;
-
-    private boolean _isStreaming;
-
-    /**
-     * Creates a new Hessian output stream, initialized with an
-     * underlying output stream.
-     *
-     * @param os the underlying output stream.
-     */
-    public Hessian2Output(OutputStream os) {
-        _os = os;
-    }
-
-    public boolean isCloseStreamOnClose() {
-        return _isCloseStreamOnClose;
-    }
-
-    public void setCloseStreamOnClose(boolean isClose) {
-        _isCloseStreamOnClose = isClose;
-    }
-
-    /**
-     * Writes a complete method call.
-     */
-    @Override
-    public void call(String method, Object[] args)
-            throws IOException {
-        int length = args != null ? args.length : 0;
-
-        startCall(method, length);
-
-        for (int i = 0; i < args.length; i++)
-            writeObject(args[i]);
-
-        completeCall();
-    }
-
-    /**
-     * Starts the method call.  Clients would use <code>startCall</code>
-     * instead of <code>call</code> if they wanted finer control over
-     * writing the arguments, or needed to write headers.
-     * <p>
-     * <code><pre>
-     * C
-     * string # method name
-     * int    # arg count
-     * </pre></code>
-     *
-     * @param method the method name to call.
-     */
-    @Override
-    public void startCall(String method, int length)
-            throws IOException {
-        int offset = _offset;
-
-        if (SIZE < offset + 32) {
-            flush();
-            offset = _offset;
-        }
-
-        byte[] buffer = _buffer;
-
-        buffer[_offset++] = (byte) 'C';
-
-        writeString(method);
-        writeInt(length);
-    }
-
-    /**
-     * Writes the call tag.  This would be followed by the
-     * method and the arguments
-     * <p>
-     * <code><pre>
-     * C
-     * </pre></code>
-     *
-     * @param method the method name to call.
-     */
-    @Override
-    public void startCall()
-            throws IOException {
-        flushIfFull();
-
-        _buffer[_offset++] = (byte) 'C';
-    }
-
-    /**
-     * Starts an envelope.
-     * <p>
-     * <code><pre>
-     * E major minor
-     * m b16 b8 method-name
-     * </pre></code>
-     *
-     * @param method the method name to call.
-     */
-    public void startEnvelope(String method)
-            throws IOException {
-        int offset = _offset;
-
-        if (SIZE < offset + 32) {
-            flush();
-            offset = _offset;
-        }
-
-        _buffer[_offset++] = (byte) 'E';
-
-        writeString(method);
-    }
-
-    /**
-     * Completes an envelope.
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * Z
-     * </pre>
-     */
-    public void completeEnvelope()
-            throws IOException {
-        flushIfFull();
-
-        _buffer[_offset++] = (byte) 'Z';
-    }
-
-    /**
-     * Writes the method tag.
-     * <p>
-     * <code><pre>
-     * string
-     * </pre></code>
-     *
-     * @param method the method name to call.
-     */
-    @Override
-    public void writeMethod(String method)
-            throws IOException {
-        writeString(method);
-    }
-
-    /**
-     * Completes.
-     * <p>
-     * <code><pre>
-     * z
-     * </pre></code>
-     */
-    @Override
-    public void completeCall()
-            throws IOException {
-    /*
-    flushIfFull();
-    
-    _buffer[_offset++] = (byte) 'Z';
-    */
-    }
-
-    /**
-     * Starts the reply
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * R
-     * </pre>
-     */
-    @Override
-    public void startReply()
-            throws IOException {
-        writeVersion();
-
-        flushIfFull();
-
-        _buffer[_offset++] = (byte) 'R';
-    }
-
-    public void writeVersion()
-            throws IOException {
-        flushIfFull();
-        _buffer[_offset++] = (byte) 'H';
-        _buffer[_offset++] = (byte) 2;
-        _buffer[_offset++] = (byte) 0;
-    }
-
-    /**
-     * Completes reading the reply
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * z
-     * </pre>
-     */
-    @Override
-    public void completeReply()
-            throws IOException {
-    }
-
-    /**
-     * Starts a packet
-     * <p>
-     * <p>A message contains several objects encapsulated by a length</p>
-     * <p>
-     * <pre>
-     * p x02 x00
-     * </pre>
-     */
-    public void startMessage()
-            throws IOException {
-        flushIfFull();
-
-        _buffer[_offset++] = (byte) 'p';
-        _buffer[_offset++] = (byte) 2;
-        _buffer[_offset++] = (byte) 0;
-    }
-
-    /**
-     * Completes reading the message
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * z
-     * </pre>
-     */
-    public void completeMessage()
-            throws IOException {
-        flushIfFull();
-
-        _buffer[_offset++] = (byte) 'z';
-    }
-
-    /**
-     * Writes a fault.  The fault will be written
-     * as a descriptive string followed by an object:
-     * <p>
-     * <code><pre>
-     * F map
-     * </pre></code>
-     * <p>
-     * <code><pre>
-     * F H
-     * \x04code
-     * \x10the fault code
-     * <p>
-     * \x07message
-     * \x11the fault message
-     * <p>
-     * \x06detail
-     * M\xnnjavax.ejb.FinderException
-     *     ...
-     * Z
-     * Z
-     * </pre></code>
-     *
-     * @param code the fault code, a three digit
-     */
-    @Override
-    public void writeFault(String code, String message, Object detail)
-            throws IOException {
-        flushIfFull();
-
-        writeVersion();
-
-        _buffer[_offset++] = (byte) 'F';
-        _buffer[_offset++] = (byte) 'H';
-
-        _refs.put(new HashMap(), _refs.size());
-
-        writeString("code");
-        writeString(code);
-
-        writeString("message");
-        writeString(message);
-
-        if (detail != null) {
-            writeString("detail");
-            writeObject(detail);
-        }
-
-        flushIfFull();
-        _buffer[_offset++] = (byte) 'Z';
-    }
-
-    /**
-     * Writes any object to the output stream.
-     */
-    @Override
-    public void writeObject(Object object)
-            throws IOException {
-        if (object == null) {
-            writeNull();
-            return;
-        }
-
-        Serializer serializer;
-
-        serializer = findSerializerFactory().getSerializer(object.getClass());
-
-        serializer.writeObject(object, this);
-    }
-
-    /**
-     * Writes the list header to the stream.  List writers will call
-     * <code>writeListBegin</code> followed by the list contents and then
-     * call <code>writeListEnd</code>.
-     * <p>
-     * <code><pre>
-     * list ::= V type value* Z
-     *      ::= v type int value*
-     * </pre></code>
-     *
-     * @return true for variable lists, false for fixed lists
-     */
-    @Override
-    public boolean writeListBegin(int length, String type)
-            throws IOException {
-        flushIfFull();
-
-        if (length < 0) {
-            if (type != null) {
-                _buffer[_offset++] = (byte) BC_LIST_VARIABLE;
-                writeType(type);
-            } else
-                _buffer[_offset++] = (byte) BC_LIST_VARIABLE_UNTYPED;
-
-            return true;
-        } else if (length <= LIST_DIRECT_MAX) {
-            if (type != null) {
-                _buffer[_offset++] = (byte) (BC_LIST_DIRECT + length);
-                writeType(type);
-            } else {
-                _buffer[_offset++] = (byte) (BC_LIST_DIRECT_UNTYPED + length);
-            }
-
-            return false;
-        } else {
-            if (type != null) {
-                _buffer[_offset++] = (byte) BC_LIST_FIXED;
-                writeType(type);
-            } else {
-                _buffer[_offset++] = (byte) BC_LIST_FIXED_UNTYPED;
-            }
-
-            writeInt(length);
-
-            return false;
-        }
-    }
-
-    /**
-     * Writes the tail of the list to the stream for a variable-length list.
-     */
-    @Override
-    public void writeListEnd()
-            throws IOException {
-        flushIfFull();
-
-        _buffer[_offset++] = (byte) BC_END;
-    }
-
-    /**
-     * Writes the map header to the stream.  Map writers will call
-     * <code>writeMapBegin</code> followed by the map contents and then
-     * call <code>writeMapEnd</code>.
-     * <p>
-     * <code><pre>
-     * map ::= M type (<value> <value>)* Z
-     *     ::= H (<value> <value>)* Z
-     * </pre></code>
-     */
-    @Override
-    public void writeMapBegin(String type)
-            throws IOException {
-        if (SIZE < _offset + 32)
-            flush();
-
-        if (type != null) {
-            _buffer[_offset++] = BC_MAP;
-
-            writeType(type);
-        } else
-            _buffer[_offset++] = BC_MAP_UNTYPED;
-    }
-
-    /**
-     * Writes the tail of the map to the stream.
-     */
-    @Override
-    public void writeMapEnd()
-            throws IOException {
-        if (SIZE < _offset + 32)
-            flush();
-
-        _buffer[_offset++] = (byte) BC_END;
-    }
-
-    /**
-     * Writes the object definition
-     * <p>
-     * <code><pre>
-     * C &lt;string> &lt;int> &lt;string>*
-     * </pre></code>
-     */
-    @Override
-    public int writeObjectBegin(String type)
-            throws IOException {
-        if (_classRefs == null)
-            _classRefs = new HashMap();
-
-        Integer refV = (Integer) _classRefs.get(type);
-
-        if (refV != null) {
-            int ref = refV.intValue();
-
-            if (SIZE < _offset + 32)
-                flush();
-
-            if (ref <= OBJECT_DIRECT_MAX) {
-                _buffer[_offset++] = (byte) (BC_OBJECT_DIRECT + ref);
-            } else {
-                _buffer[_offset++] = (byte) 'O';
-                writeInt(ref);
-            }
-
-            return ref;
-        } else {
-            int ref = _classRefs.size();
-
-            _classRefs.put(type, Integer.valueOf(ref));
-
-            if (SIZE < _offset + 32)
-                flush();
-
-            _buffer[_offset++] = (byte) 'C';
-
-            writeString(type);
-
-            return -1;
-        }
-    }
-
-    /**
-     * Writes the tail of the class definition to the stream.
-     */
-    @Override
-    public void writeClassFieldLength(int len)
-            throws IOException {
-        writeInt(len);
-    }
-
-    /**
-     * Writes the tail of the object definition to the stream.
-     */
-    @Override
-    public void writeObjectEnd()
-            throws IOException {
-    }
-
-    /**
-     * <code><pre>
-     * type ::= string
-     *      ::= int
-     * </code></pre>
-     */
-    private void writeType(String type)
-            throws IOException {
-        flushIfFull();
-
-        int len = type.length();
-        if (len == 0) {
-            throw new IllegalArgumentException("empty type is not allowed");
-        }
-
-        if (_typeRefs == null)
-            _typeRefs = new HashMap();
-
-        Integer typeRefV = (Integer) _typeRefs.get(type);
-
-        if (typeRefV != null) {
-            int typeRef = typeRefV.intValue();
-
-            writeInt(typeRef);
-        } else {
-            _typeRefs.put(type, Integer.valueOf(_typeRefs.size()));
-
-            writeString(type);
-        }
-    }
-
-    /**
-     * Writes a boolean value to the stream.  The boolean will be written
-     * with the following syntax:
-     * <p>
-     * <code><pre>
-     * T
-     * F
-     * </pre></code>
-     *
-     * @param value the boolean value to write.
-     */
-    @Override
-    public void writeBoolean(boolean value)
-            throws IOException {
-        if (SIZE < _offset + 16)
-            flush();
-
-        if (value)
-            _buffer[_offset++] = (byte) 'T';
-        else
-            _buffer[_offset++] = (byte) 'F';
-    }
-
-    /**
-     * Writes an integer value to the stream.  The integer will be written
-     * with the following syntax:
-     * <p>
-     * <code><pre>
-     * I b32 b24 b16 b8
-     * </pre></code>
-     *
-     * @param value the integer value to write.
-     */
-    @Override
-    public void writeInt(int value)
-            throws IOException {
-        int offset = _offset;
-        byte[] buffer = _buffer;
-
-        if (SIZE <= offset + 16) {
-            flush();
-            offset = _offset;
-        }
-
-        if (INT_DIRECT_MIN <= value && value <= INT_DIRECT_MAX)
-            buffer[offset++] = (byte) (value + BC_INT_ZERO);
-        else if (INT_BYTE_MIN <= value && value <= INT_BYTE_MAX) {
-            buffer[offset++] = (byte) (BC_INT_BYTE_ZERO + (value >> 8));
-            buffer[offset++] = (byte) (value);
-        } else if (INT_SHORT_MIN <= value && value <= INT_SHORT_MAX) {
-            buffer[offset++] = (byte) (BC_INT_SHORT_ZERO + (value >> 16));
-            buffer[offset++] = (byte) (value >> 8);
-            buffer[offset++] = (byte) (value);
-        } else {
-            buffer[offset++] = (byte) ('I');
-            buffer[offset++] = (byte) (value >> 24);
-            buffer[offset++] = (byte) (value >> 16);
-            buffer[offset++] = (byte) (value >> 8);
-            buffer[offset++] = (byte) (value);
-        }
-
-        _offset = offset;
-    }
-
-    /**
-     * Writes a long value to the stream.  The long will be written
-     * with the following syntax:
-     * <p>
-     * <code><pre>
-     * L b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre></code>
-     *
-     * @param value the long value to write.
-     */
-    @Override
-    public void writeLong(long value)
-            throws IOException {
-        int offset = _offset;
-        byte[] buffer = _buffer;
-
-        if (SIZE <= offset + 16) {
-            flush();
-            offset = _offset;
-        }
-
-        if (LONG_DIRECT_MIN <= value && value <= LONG_DIRECT_MAX) {
-            buffer[offset++] = (byte) (value + BC_LONG_ZERO);
-        } else if (LONG_BYTE_MIN <= value && value <= LONG_BYTE_MAX) {
-            buffer[offset++] = (byte) (BC_LONG_BYTE_ZERO + (value >> 8));
-            buffer[offset++] = (byte) (value);
-        } else if (LONG_SHORT_MIN <= value && value <= LONG_SHORT_MAX) {
-            buffer[offset++] = (byte) (BC_LONG_SHORT_ZERO + (value >> 16));
-            buffer[offset++] = (byte) (value >> 8);
-            buffer[offset++] = (byte) (value);
-        } else if (-0x80000000L <= value && value <= 0x7fffffffL) {
-            buffer[offset + 0] = (byte) BC_LONG_INT;
-            buffer[offset + 1] = (byte) (value >> 24);
-            buffer[offset + 2] = (byte) (value >> 16);
-            buffer[offset + 3] = (byte) (value >> 8);
-            buffer[offset + 4] = (byte) (value);
-
-            offset += 5;
-        } else {
-            buffer[offset + 0] = (byte) 'L';
-            buffer[offset + 1] = (byte) (value >> 56);
-            buffer[offset + 2] = (byte) (value >> 48);
-            buffer[offset + 3] = (byte) (value >> 40);
-            buffer[offset + 4] = (byte) (value >> 32);
-            buffer[offset + 5] = (byte) (value >> 24);
-            buffer[offset + 6] = (byte) (value >> 16);
-            buffer[offset + 7] = (byte) (value >> 8);
-            buffer[offset + 8] = (byte) (value);
-
-            offset += 9;
-        }
-
-        _offset = offset;
-    }
-
-    /**
-     * Writes a double value to the stream.  The double will be written
-     * with the following syntax:
-     * <p>
-     * <code><pre>
-     * D b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre></code>
-     *
-     * @param value the double value to write.
-     */
-    @Override
-    public void writeDouble(double value)
-            throws IOException {
-        int offset = _offset;
-        byte[] buffer = _buffer;
-
-        if (SIZE <= offset + 16) {
-            flush();
-            offset = _offset;
-        }
-
-        int intValue = (int) value;
-
-        if (intValue == value) {
-            if (intValue == 0) {
-                buffer[offset++] = (byte) BC_DOUBLE_ZERO;
-
-                _offset = offset;
-
-                return;
-            } else if (intValue == 1) {
-                buffer[offset++] = (byte) BC_DOUBLE_ONE;
-
-                _offset = offset;
-
-                return;
-            } else if (-0x80 <= intValue && intValue < 0x80) {
-                buffer[offset++] = (byte) BC_DOUBLE_BYTE;
-                buffer[offset++] = (byte) intValue;
-
-                _offset = offset;
-
-                return;
-            } else if (-0x8000 <= intValue && intValue < 0x8000) {
-                buffer[offset + 0] = (byte) BC_DOUBLE_SHORT;
-                buffer[offset + 1] = (byte) (intValue >> 8);
-                buffer[offset + 2] = (byte) intValue;
-
-                _offset = offset + 3;
-
-                return;
-            }
-        }
-
-        int mills = (int) (value * 1000);
-
-        if (0.001 * mills == value) {
-            buffer[offset + 0] = (byte) (BC_DOUBLE_MILL);
-            buffer[offset + 1] = (byte) (mills >> 24);
-            buffer[offset + 2] = (byte) (mills >> 16);
-            buffer[offset + 3] = (byte) (mills >> 8);
-            buffer[offset + 4] = (byte) (mills);
-
-            _offset = offset + 5;
-
-            return;
-        }
-
-        long bits = Double.doubleToLongBits(value);
-
-        buffer[offset + 0] = (byte) 'D';
-        buffer[offset + 1] = (byte) (bits >> 56);
-        buffer[offset + 2] = (byte) (bits >> 48);
-        buffer[offset + 3] = (byte) (bits >> 40);
-        buffer[offset + 4] = (byte) (bits >> 32);
-        buffer[offset + 5] = (byte) (bits >> 24);
-        buffer[offset + 6] = (byte) (bits >> 16);
-        buffer[offset + 7] = (byte) (bits >> 8);
-        buffer[offset + 8] = (byte) (bits);
-
-        _offset = offset + 9;
-    }
-
-    /**
-     * Writes a date to the stream.
-     * <p>
-     * <code><pre>
-     * date ::= d   b7 b6 b5 b4 b3 b2 b1 b0
-     *      ::= x65 b3 b2 b1 b0
-     * </pre></code>
-     *
-     * @param time the date in milliseconds from the epoch in UTC
-     */
-    @Override
-    public void writeUTCDate(long time)
-            throws IOException {
-        if (SIZE < _offset + 32)
-            flush();
-
-        int offset = _offset;
-        byte[] buffer = _buffer;
-
-        if (time % 60000L == 0) {
-            // compact date ::= x65 b3 b2 b1 b0
-
-            long minutes = time / 60000L;
-
-            if ((minutes >> 31) == 0 || (minutes >> 31) == -1) {
-                buffer[offset++] = (byte) BC_DATE_MINUTE;
-                buffer[offset++] = ((byte) (minutes >> 24));
-                buffer[offset++] = ((byte) (minutes >> 16));
-                buffer[offset++] = ((byte) (minutes >> 8));
-                buffer[offset++] = ((byte) (minutes >> 0));
-
-                _offset = offset;
-                return;
-            }
-        }
-
-        buffer[offset++] = (byte) BC_DATE;
-        buffer[offset++] = ((byte) (time >> 56));
-        buffer[offset++] = ((byte) (time >> 48));
-        buffer[offset++] = ((byte) (time >> 40));
-        buffer[offset++] = ((byte) (time >> 32));
-        buffer[offset++] = ((byte) (time >> 24));
-        buffer[offset++] = ((byte) (time >> 16));
-        buffer[offset++] = ((byte) (time >> 8));
-        buffer[offset++] = ((byte) (time));
-
-        _offset = offset;
-    }
-
-    /**
-     * Writes a null value to the stream.
-     * The null will be written with the following syntax
-     * <p>
-     * <code><pre>
-     * N
-     * </pre></code>
-     *
-     * @param value the string value to write.
-     */
-    @Override
-    public void writeNull()
-            throws IOException {
-        int offset = _offset;
-        byte[] buffer = _buffer;
-
-        if (SIZE <= offset + 16) {
-            flush();
-            offset = _offset;
-        }
-
-        buffer[offset++] = 'N';
-
-        _offset = offset;
-    }
-
-    /**
-     * Writes a string value to the stream using UTF-8 encoding.
-     * The string will be written with the following syntax:
-     * <p>
-     * <code><pre>
-     * S b16 b8 string-value
-     * </pre></code>
-     * <p>
-     * If the value is null, it will be written as
-     * <p>
-     * <code><pre>
-     * N
-     * </pre></code>
-     *
-     * @param value the string value to write.
-     */
-    @Override
-    public void writeString(String value)
-            throws IOException {
-        int offset = _offset;
-        byte[] buffer = _buffer;
-
-        if (SIZE <= offset + 16) {
-            flush();
-            offset = _offset;
-        }
-
-        if (value == null) {
-            buffer[offset++] = (byte) 'N';
-
-            _offset = offset;
-        } else {
-            int length = value.length();
-            int strOffset = 0;
-
-            while (length > 0x8000) {
-                int sublen = 0x8000;
-
-                offset = _offset;
-
-                if (SIZE <= offset + 16) {
-                    flush();
-                    offset = _offset;
-                }
-
-                // chunk can't end in high surrogate
-                char tail = value.charAt(strOffset + sublen - 1);
-
-                if (0xd800 <= tail && tail <= 0xdbff)
-                    sublen--;
-
-                buffer[offset + 0] = (byte) BC_STRING_CHUNK;
-                buffer[offset + 1] = (byte) (sublen >> 8);
-                buffer[offset + 2] = (byte) (sublen);
-
-                _offset = offset + 3;
-
-                printString(value, strOffset, sublen);
-
-                length -= sublen;
-                strOffset += sublen;
-            }
-
-            offset = _offset;
-
-            if (SIZE <= offset + 16) {
-                flush();
-                offset = _offset;
-            }
-
-            if (length <= STRING_DIRECT_MAX) {
-                buffer[offset++] = (byte) (BC_STRING_DIRECT + length);
-            } else if (length <= STRING_SHORT_MAX) {
-                buffer[offset++] = (byte) (BC_STRING_SHORT + (length >> 8));
-                buffer[offset++] = (byte) (length);
-            } else {
-                buffer[offset++] = (byte) ('S');
-                buffer[offset++] = (byte) (length >> 8);
-                buffer[offset++] = (byte) (length);
-            }
-
-            _offset = offset;
-
-            printString(value, strOffset, length);
-        }
-    }
-
-    /**
-     * Writes a string value to the stream using UTF-8 encoding.
-     * The string will be written with the following syntax:
-     * <p>
-     * <code><pre>
-     * S b16 b8 string-value
-     * </pre></code>
-     * <p>
-     * If the value is null, it will be written as
-     * <p>
-     * <code><pre>
-     * N
-     * </pre></code>
-     *
-     * @param value the string value to write.
-     */
-    @Override
-    public void writeString(char[] buffer, int offset, int length)
-            throws IOException {
-        if (buffer == null) {
-            if (SIZE < _offset + 16)
-                flush();
-
-            _buffer[_offset++] = (byte) ('N');
-        } else {
-            while (length > 0x8000) {
-                int sublen = 0x8000;
-
-                if (SIZE < _offset + 16)
-                    flush();
-
-                // chunk can't end in high surrogate
-                char tail = buffer[offset + sublen - 1];
-
-                if (0xd800 <= tail && tail <= 0xdbff)
-                    sublen--;
-
-                _buffer[_offset++] = (byte) BC_STRING_CHUNK;
-                _buffer[_offset++] = (byte) (sublen >> 8);
-                _buffer[_offset++] = (byte) (sublen);
-
-                printString(buffer, offset, sublen);
-
-                length -= sublen;
-                offset += sublen;
-            }
-
-            if (SIZE < _offset + 16)
-                flush();
-
-            if (length <= STRING_DIRECT_MAX) {
-                _buffer[_offset++] = (byte) (BC_STRING_DIRECT + length);
-            } else if (length <= STRING_SHORT_MAX) {
-                _buffer[_offset++] = (byte) (BC_STRING_SHORT + (length >> 8));
-                _buffer[_offset++] = (byte) length;
-            } else {
-                _buffer[_offset++] = (byte) ('S');
-                _buffer[_offset++] = (byte) (length >> 8);
-                _buffer[_offset++] = (byte) (length);
-            }
-
-            printString(buffer, offset, length);
-        }
-    }
-
-    /**
-     * Writes a byte array to the stream.
-     * The array will be written with the following syntax:
-     * <p>
-     * <code><pre>
-     * B b16 b18 bytes
-     * </pre></code>
-     * <p>
-     * If the value is null, it will be written as
-     * <p>
-     * <code><pre>
-     * N
-     * </pre></code>
-     *
-     * @param value the string value to write.
-     */
-    @Override
-    public void writeBytes(byte[] buffer)
-            throws IOException {
-        if (buffer == null) {
-            if (SIZE < _offset + 16)
-                flush();
-
-            _buffer[_offset++] = 'N';
-        } else
-            writeBytes(buffer, 0, buffer.length);
-    }
-
-    /**
-     * Writes a byte array to the stream.
-     * The array will be written with the following syntax:
-     * <p>
-     * <code><pre>
-     * B b16 b18 bytes
-     * </pre></code>
-     * <p>
-     * If the value is null, it will be written as
-     * <p>
-     * <code><pre>
-     * N
-     * </pre></code>
-     *
-     * @param value the string value to write.
-     */
-    @Override
-    public void writeBytes(byte[] buffer, int offset, int length)
-            throws IOException {
-        if (buffer == null) {
-            if (SIZE < _offset + 16)
-                flushBuffer();
-
-            _buffer[_offset++] = (byte) 'N';
-        } else {
-            flush();
-
-            while (SIZE - _offset - 3 < length) {
-                int sublen = SIZE - _offset - 3;
-
-                if (sublen < 16) {
-                    flushBuffer();
-
-                    sublen = SIZE - _offset - 3;
-
-                    if (length < sublen)
-                        sublen = length;
-                }
-
-                _buffer[_offset++] = (byte) BC_BINARY_CHUNK;
-                _buffer[_offset++] = (byte) (sublen >> 8);
-                _buffer[_offset++] = (byte) sublen;
-
-                System.arraycopy(buffer, offset, _buffer, _offset, sublen);
-                _offset += sublen;
-
-                length -= sublen;
-                offset += sublen;
-
-                flushBuffer();
-            }
-
-            if (SIZE < _offset + 16)
-                flushBuffer();
-
-            if (length <= BINARY_DIRECT_MAX) {
-                _buffer[_offset++] = (byte) (BC_BINARY_DIRECT + length);
-            } else if (length <= BINARY_SHORT_MAX) {
-                _buffer[_offset++] = (byte) (BC_BINARY_SHORT + (length >> 8));
-                _buffer[_offset++] = (byte) (length);
-            } else {
-                _buffer[_offset++] = (byte) 'B';
-                _buffer[_offset++] = (byte) (length >> 8);
-                _buffer[_offset++] = (byte) (length);
-            }
-
-            System.arraycopy(buffer, offset, _buffer, _offset, length);
-
-            _offset += length;
-        }
-    }
-
-    /**
-     * Writes a byte buffer to the stream.
-     * <p>
-     * <code><pre>
-     * </pre></code>
-     */
-    @Override
-    public void writeByteBufferStart()
-            throws IOException {
-    }
-
-    /**
-     * Writes a byte buffer to the stream.
-     * <p>
-     * <code><pre>
-     * b b16 b18 bytes
-     * </pre></code>
-     */
-    @Override
-    public void writeByteBufferPart(byte[] buffer, int offset, int length)
-            throws IOException {
-        while (length > 0) {
-            int sublen = length;
-
-            if (0x8000 < sublen)
-                sublen = 0x8000;
-
-            flush(); // bypass buffer
-
-            _os.write(BC_BINARY_CHUNK);
-            _os.write(sublen >> 8);
-            _os.write(sublen);
-
-            _os.write(buffer, offset, sublen);
-
-            length -= sublen;
-            offset += sublen;
-        }
-    }
-
-    /**
-     * Writes a byte buffer to the stream.
-     * <p>
-     * <code><pre>
-     * b b16 b18 bytes
-     * </pre></code>
-     */
-    @Override
-    public void writeByteBufferEnd(byte[] buffer, int offset, int length)
-            throws IOException {
-        writeBytes(buffer, offset, length);
-    }
-
-    /**
-     * Returns an output stream to write binary data.
-     */
-    public OutputStream getBytesOutputStream()
-            throws IOException {
-        return new BytesOutputStream();
-    }
-
-    /**
-     * Writes a reference.
-     * <p>
-     * <code><pre>
-     * x51 &lt;int>
-     * </pre></code>
-     *
-     * @param value the integer value to write.
-     */
-    @Override
-    protected void writeRef(int value)
-            throws IOException {
-        if (SIZE < _offset + 16)
-            flush();
-
-        _buffer[_offset++] = (byte) BC_REF;
-
-        writeInt(value);
-    }
-
-    /**
-     * If the object has already been written, just write its ref.
-     *
-     * @return true if we're writing a ref.
-     */
-    @Override
-    public boolean addRef(Object object)
-            throws IOException {
-        int ref = _refs.get(object);
-
-        if (ref >= 0) {
-            writeRef(ref);
-
-            return true;
-        } else {
-            _refs.put(object, _refs.size());
-
-            return false;
-        }
-    }
-
-    /**
-     * Removes a reference.
-     */
-    @Override
-    public boolean removeRef(Object obj)
-            throws IOException {
-        if (_refs != null) {
-            _refs.remove(obj);
-
-            return true;
-        } else
-            return false;
-    }
-
-    /**
-     * Replaces a reference from one object to another.
-     */
-    @Override
-    public boolean replaceRef(Object oldRef, Object newRef)
-            throws IOException {
-        Integer value = (Integer) _refs.remove(oldRef);
-
-        if (value != null) {
-            _refs.put(newRef, value);
-            return true;
-        } else
-            return false;
-    }
-
-    /**
-     * Resets the references for streaming.
-     */
-    @Override
-    public void resetReferences() {
-        if (_refs != null)
-            _refs.clear();
-    }
-
-    /**
-     * Starts the streaming message
-     * <p>
-     * <p>A streaming message starts with 'P'</p>
-     * <p>
-     * <pre>
-     * P x02 x00
-     * </pre>
-     */
-    public void writeStreamingObject(Object obj)
-            throws IOException {
-        startStreamingPacket();
-
-        writeObject(obj);
-
-        endStreamingPacket();
-    }
-
-    /**
-     * Starts a streaming packet
-     * <p>
-     * <p>A streaming message starts with 'P'</p>
-     * <p>
-     * <pre>
-     * P x02 x00
-     * </pre>
-     */
-    public void startStreamingPacket()
-            throws IOException {
-        if (_refs != null)
-            _refs.clear();
-
-        flush();
-
-        _isStreaming = true;
-        _offset = 3;
-    }
-
-    public void endStreamingPacket()
-            throws IOException {
-        int len = _offset - 3;
-
-        _buffer[0] = (byte) 'P';
-        _buffer[1] = (byte) (len >> 8);
-        _buffer[2] = (byte) len;
-
-        _isStreaming = false;
-
-        flush();
-    }
-
-    /**
-     * Prints a string to the stream, encoded as UTF-8 with preceeding length
-     *
-     * @param v the string to print.
-     */
-    public void printLenString(String v)
-            throws IOException {
-        if (SIZE < _offset + 16)
-            flush();
-
-        if (v == null) {
-            _buffer[_offset++] = (byte) (0);
-            _buffer[_offset++] = (byte) (0);
-        } else {
-            int len = v.length();
-            _buffer[_offset++] = (byte) (len >> 8);
-            _buffer[_offset++] = (byte) (len);
-
-            printString(v, 0, len);
-        }
-    }
-
-    /**
-     * Prints a string to the stream, encoded as UTF-8
-     *
-     * @param v the string to print.
-     */
-    public void printString(String v)
-            throws IOException {
-        printString(v, 0, v.length());
-    }
-
-    /**
-     * Prints a string to the stream, encoded as UTF-8
-     *
-     * @param v the string to print.
-     */
-    public void printString(String v, int strOffset, int length)
-            throws IOException {
-        int offset = _offset;
-        byte[] buffer = _buffer;
-
-        for (int i = 0; i < length; i++) {
-            if (SIZE <= offset + 16) {
-                _offset = offset;
-                flush();
-                offset = _offset;
-            }
-
-            char ch = v.charAt(i + strOffset);
-
-            if (ch < 0x80)
-                buffer[offset++] = (byte) (ch);
-            else if (ch < 0x800) {
-                buffer[offset++] = (byte) (0xc0 + ((ch >> 6) & 0x1f));
-                buffer[offset++] = (byte) (0x80 + (ch & 0x3f));
-            } else {
-                buffer[offset++] = (byte) (0xe0 + ((ch >> 12) & 0xf));
-                buffer[offset++] = (byte) (0x80 + ((ch >> 6) & 0x3f));
-                buffer[offset++] = (byte) (0x80 + (ch & 0x3f));
-            }
-        }
-
-        _offset = offset;
-    }
-
-    /**
-     * Prints a string to the stream, encoded as UTF-8
-     *
-     * @param v the string to print.
-     */
-    public void printString(char[] v, int strOffset, int length)
-            throws IOException {
-        int offset = _offset;
-        byte[] buffer = _buffer;
-
-        for (int i = 0; i < length; i++) {
-            if (SIZE <= offset + 16) {
-                _offset = offset;
-                flush();
-                offset = _offset;
-            }
-
-            char ch = v[i + strOffset];
-
-            if (ch < 0x80)
-                buffer[offset++] = (byte) (ch);
-            else if (ch < 0x800) {
-                buffer[offset++] = (byte) (0xc0 + ((ch >> 6) & 0x1f));
-                buffer[offset++] = (byte) (0x80 + (ch & 0x3f));
-            } else {
-                buffer[offset++] = (byte) (0xe0 + ((ch >> 12) & 0xf));
-                buffer[offset++] = (byte) (0x80 + ((ch >> 6) & 0x3f));
-                buffer[offset++] = (byte) (0x80 + (ch & 0x3f));
-            }
-        }
-
-        _offset = offset;
-    }
-
-    private final void flushIfFull()
-            throws IOException {
-        int offset = _offset;
-
-        if (SIZE < offset + 32) {
-            _offset = 0;
-            _os.write(_buffer, 0, offset);
-        }
-    }
-
-    @Override
-    public final void flush()
-            throws IOException {
-        flushBuffer();
-
-        if (_os != null)
-            _os.flush();
-    }
-
-    public final void flushBuffer()
-            throws IOException {
-        int offset = _offset;
-
-        if (!_isStreaming && offset > 0) {
-            _offset = 0;
-
-            _os.write(_buffer, 0, offset);
-        } else if (_isStreaming && offset > 3) {
-            int len = offset - 3;
-            _buffer[0] = 'p';
-            _buffer[1] = (byte) (len >> 8);
-            _buffer[2] = (byte) len;
-            _offset = 3;
-
-            _os.write(_buffer, 0, offset);
-        }
-    }
-
-    @Override
-    public final void close()
-            throws IOException {
-        // hessian/3a8c
-        flush();
-
-        OutputStream os = _os;
-        _os = null;
-
-        if (os != null) {
-            if (_isCloseStreamOnClose)
-                os.close();
-        }
-    }
-
-    class BytesOutputStream extends OutputStream {
-        private int _startOffset;
-
-        BytesOutputStream()
-                throws IOException {
-            if (SIZE < _offset + 16) {
-                Hessian2Output.this.flush();
-            }
-
-            _startOffset = _offset;
-            _offset += 3; // skip 'b' xNN xNN
-        }
-
-        @Override
-        public void write(int ch)
-                throws IOException {
-            if (SIZE <= _offset) {
-                int length = (_offset - _startOffset) - 3;
-
-                _buffer[_startOffset] = (byte) BC_BINARY_CHUNK;
-                _buffer[_startOffset + 1] = (byte) (length >> 8);
-                _buffer[_startOffset + 2] = (byte) (length);
-
-                Hessian2Output.this.flush();
-
-                _startOffset = _offset;
-                _offset += 3;
-            }
-
-            _buffer[_offset++] = (byte) ch;
-        }
-
-        @Override
-        public void write(byte[] buffer, int offset, int length)
-                throws IOException {
-            while (length > 0) {
-                int sublen = SIZE - _offset;
-
-                if (length < sublen)
-                    sublen = length;
-
-                if (sublen > 0) {
-                    System.arraycopy(buffer, offset, _buffer, _offset, sublen);
-                    _offset += sublen;
-                }
-
-                length -= sublen;
-                offset += sublen;
-
-                if (SIZE <= _offset) {
-                    int chunkLength = (_offset - _startOffset) - 3;
-
-                    _buffer[_startOffset] = (byte) BC_BINARY_CHUNK;
-                    _buffer[_startOffset + 1] = (byte) (chunkLength >> 8);
-                    _buffer[_startOffset + 2] = (byte) (chunkLength);
-
-                    Hessian2Output.this.flush();
-
-                    _startOffset = _offset;
-                    _offset += 3;
-                }
-            }
-        }
-
-        @Override
-        public void close()
-                throws IOException {
-            int startOffset = _startOffset;
-            _startOffset = -1;
-
-            if (startOffset < 0)
-                return;
-
-            int length = (_offset - startOffset) - 3;
-
-            _buffer[startOffset] = (byte) 'B';
-            _buffer[startOffset + 1] = (byte) (length >> 8);
-            _buffer[startOffset + 2] = (byte) (length);
-
-            Hessian2Output.this.flush();
-        }
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2StreamingInput.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2StreamingInput.java
deleted file mode 100644
index ebf8b779bd..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2StreamingInput.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Output stream for Hessian 2 streaming requests.
- */
-public class Hessian2StreamingInput {
-    private Hessian2Input _in;
-
-    /**
-     * Creates a new Hessian input stream, initialized with an
-     * underlying input stream.
-     *
-     * @param is the underlying output stream.
-     */
-    public Hessian2StreamingInput(InputStream is) {
-        _in = new Hessian2Input(new StreamingInputStream(is));
-    }
-
-    /**
-     * Read the next object
-     */
-    public Object readObject()
-            throws IOException {
-        return _in.readStreamingObject();
-    }
-
-    /**
-     * Close the output.
-     */
-    public void close()
-            throws IOException {
-        _in.close();
-    }
-
-    static class StreamingInputStream extends InputStream {
-        private InputStream _is;
-        private int _length;
-
-        StreamingInputStream(InputStream is) {
-            _is = is;
-        }
-
-        @Override
-        public int read()
-                throws IOException {
-            InputStream is = _is;
-
-            while (_length == 0) {
-                int code = is.read();
-
-                if (code < 0)
-                    return -1;
-                else if (code != 'p' && code != 'P')
-                    throw new HessianProtocolException("expected streaming packet at 0x"
-                            + Integer.toHexString(code & 0xff));
-
-                int d1 = is.read();
-                int d2 = is.read();
-
-                if (d2 < 0)
-                    return -1;
-
-                _length = (d1 << 8) + d2;
-            }
-
-            _length--;
-            return is.read();
-        }
-
-        @Override
-        public int read(byte[] buffer, int offset, int length)
-                throws IOException {
-            InputStream is = _is;
-
-            while (_length == 0) {
-                int code = is.read();
-
-                if (code < 0)
-                    return -1;
-                else if (code != 'p' && code != 'P') {
-                    throw new HessianProtocolException("expected streaming packet at 0x"
-                            + Integer.toHexString(code & 0xff)
-                            + " (" + (char) code + ")");
-                }
-
-                int d1 = is.read();
-                int d2 = is.read();
-
-                if (d2 < 0)
-                    return -1;
-
-                _length = (d1 << 8) + d2;
-            }
-
-            int sublen = _length;
-            if (length < sublen)
-                sublen = length;
-
-            sublen = is.read(buffer, offset, sublen);
-
-            if (sublen < 0)
-                return -1;
-
-            _length -= sublen;
-
-            return sublen;
-        }
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2StreamingOutput.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2StreamingOutput.java
deleted file mode 100644
index 19fb33169e..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2StreamingOutput.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * Output stream for Hessian 2 streaming requests.
- */
-public class Hessian2StreamingOutput {
-    private Hessian2Output _out;
-
-    /**
-     * Creates a new Hessian output stream, initialized with an
-     * underlying output stream.
-     *
-     * @param os the underlying output stream.
-     */
-    public Hessian2StreamingOutput(OutputStream os) {
-        _out = new Hessian2Output(os);
-    }
-
-    public boolean isCloseStreamOnClose() {
-        return _out.isCloseStreamOnClose();
-    }
-
-    public void setCloseStreamOnClose(boolean isClose) {
-        _out.setCloseStreamOnClose(isClose);
-    }
-
-    /**
-     * Writes any object to the output stream.
-     */
-    public void writeObject(Object object)
-            throws IOException {
-        _out.writeStreamingObject(object);
-    }
-
-    /**
-     * Flushes the output.
-     */
-    public void flush()
-            throws IOException {
-        _out.flush();
-    }
-
-    /**
-     * Close the output.
-     */
-    public void close()
-            throws IOException {
-        _out.close();
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianDebugInputStream.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianDebugInputStream.java
deleted file mode 100644
index 092fa22822..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianDebugInputStream.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.io.Writer;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Debugging input stream for Hessian requests.
- */
-public class HessianDebugInputStream extends InputStream {
-    private InputStream _is;
-
-    private HessianDebugState _state;
-
-    /**
-     * Creates an uninitialized Hessian input stream.
-     */
-    public HessianDebugInputStream(InputStream is, PrintWriter dbg) {
-        _is = is;
-
-        if (dbg == null)
-            dbg = new PrintWriter(System.out);
-
-        _state = new HessianDebugState(dbg);
-    }
-
-    /**
-     * Creates an uninitialized Hessian input stream.
-     */
-    public HessianDebugInputStream(InputStream is, Logger log, Level level) {
-        this(is, new PrintWriter(new LogWriter(log, level)));
-    }
-
-    public void startTop2() {
-        _state.startTop2();
-    }
-
-    /**
-     * Reads a character.
-     */
-    @Override
-    public int read()
-            throws IOException {
-        int ch;
-
-        InputStream is = _is;
-
-        if (is == null)
-            return -1;
-        else {
-            ch = is.read();
-        }
-
-        _state.next(ch);
-
-        return ch;
-    }
-
-    /**
-     * closes the stream.
-     */
-    @Override
-    public void close()
-            throws IOException {
-        InputStream is = _is;
-        _is = null;
-
-        if (is != null)
-            is.close();
-
-        _state.println();
-    }
-
-    static class LogWriter extends Writer {
-        private Logger _log;
-        private Level _level;
-        private StringBuilder _sb = new StringBuilder();
-
-        LogWriter(Logger log, Level level) {
-            _log = log;
-            _level = level;
-        }
-
-        public void write(char ch) {
-            if (ch == '\n' && _sb.length() > 0) {
-                _log.log(_level, _sb.toString());
-                _sb.setLength(0);
-            } else
-                _sb.append((char) ch);
-        }
-
-        @Override
-        public void write(char[] buffer, int offset, int length) {
-            for (int i = 0; i < length; i++) {
-                char ch = buffer[offset + i];
-
-                if (ch == '\n' && _sb.length() > 0) {
-                    _log.log(_level, _sb.toString());
-                    _sb.setLength(0);
-                } else
-                    _sb.append((char) ch);
-            }
-        }
-
-        @Override
-        public void flush() {
-        }
-
-        @Override
-        public void close() {
-        }
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianDebugOutputStream.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianDebugOutputStream.java
deleted file mode 100644
index 5d45d930e0..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianDebugOutputStream.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.io.Writer;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * Debugging output stream for Hessian requests.
- */
-public class HessianDebugOutputStream extends OutputStream {
-    private OutputStream _os;
-
-    private HessianDebugState _state;
-
-    /**
-     * Creates an uninitialized Hessian input stream.
-     */
-    public HessianDebugOutputStream(OutputStream os, PrintWriter dbg) {
-        _os = os;
-
-        _state = new HessianDebugState(dbg);
-    }
-
-    /**
-     * Creates an uninitialized Hessian input stream.
-     */
-    public HessianDebugOutputStream(OutputStream os, Logger log, Level level) {
-        this(os, new PrintWriter(new LogWriter(log, level)));
-    }
-
-    public void startTop2() {
-        _state.startTop2();
-    }
-
-    /**
-     * Writes a character.
-     */
-    @Override
-    public void write(int ch)
-            throws IOException {
-        ch = ch & 0xff;
-
-        _os.write(ch);
-
-        _state.next(ch);
-    }
-
-    @Override
-    public void flush()
-            throws IOException {
-        _os.flush();
-    }
-
-    /**
-     * closes the stream.
-     */
-    @Override
-    public void close()
-            throws IOException {
-        OutputStream os = _os;
-        _os = null;
-
-        if (os != null)
-            os.close();
-
-        _state.println();
-    }
-
-    static class LogWriter extends Writer {
-        private Logger _log;
-        private Level _level;
-        private StringBuilder _sb = new StringBuilder();
-
-        LogWriter(Logger log, Level level) {
-            _log = log;
-            _level = level;
-        }
-
-        public void write(char ch) {
-            if (ch == '\n' && _sb.length() > 0) {
-                _log.log(_level, _sb.toString());
-                _sb.setLength(0);
-            } else
-                _sb.append((char) ch);
-        }
-
-        @Override
-        public void write(char[] buffer, int offset, int length) {
-            for (int i = 0; i < length; i++) {
-                char ch = buffer[offset + i];
-
-                if (ch == '\n' && _sb.length() > 0) {
-                    _log.log(_level, _sb.toString());
-                    _sb.setLength(0);
-                } else
-                    _sb.append((char) ch);
-            }
-        }
-
-        @Override
-        public void flush() {
-        }
-
-        @Override
-        public void close() {
-        }
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianDebugState.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianDebugState.java
deleted file mode 100644
index 0798289070..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianDebugState.java
+++ /dev/null
@@ -1,2204 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-
-/**
- * Debugging input stream for Hessian requests.
- */
-public class HessianDebugState implements Hessian2Constants {
-    private PrintWriter _dbg;
-
-    private State _state;
-    private ArrayList<State> _stateStack = new ArrayList<State>();
-
-    private ArrayList<ObjectDef> _objectDefList
-            = new ArrayList<ObjectDef>();
-
-    private ArrayList<String> _typeDefList
-            = new ArrayList<String>();
-
-    private int _refId;
-    private boolean _isNewline = true;
-    private boolean _isObject = false;
-    private int _column;
-
-    /**
-     * Creates an uninitialized Hessian input stream.
-     */
-    public HessianDebugState(PrintWriter dbg) {
-        _dbg = dbg;
-
-        _state = new InitialState();
-    }
-
-    static boolean isString(int ch) {
-        switch (ch) {
-            case 0x00:
-            case 0x01:
-            case 0x02:
-            case 0x03:
-            case 0x04:
-            case 0x05:
-            case 0x06:
-            case 0x07:
-            case 0x08:
-            case 0x09:
-            case 0x0a:
-            case 0x0b:
-            case 0x0c:
-            case 0x0d:
-            case 0x0e:
-            case 0x0f:
-
-            case 0x10:
-            case 0x11:
-            case 0x12:
-            case 0x13:
-            case 0x14:
-            case 0x15:
-            case 0x16:
-            case 0x17:
-            case 0x18:
-            case 0x19:
-            case 0x1a:
-            case 0x1b:
-            case 0x1c:
-            case 0x1d:
-            case 0x1e:
-            case 0x1f:
-
-            case 0x30:
-            case 0x31:
-            case 0x32:
-            case 0x33:
-
-            case 'R':
-            case 'S':
-                return true;
-
-            default:
-                return false;
-        }
-    }
-
-    static boolean isInteger(int ch) {
-        switch (ch) {
-            case 0x80:
-            case 0x81:
-            case 0x82:
-            case 0x83:
-            case 0x84:
-            case 0x85:
-            case 0x86:
-            case 0x87:
-            case 0x88:
-            case 0x89:
-            case 0x8a:
-            case 0x8b:
-            case 0x8c:
-            case 0x8d:
-            case 0x8e:
-            case 0x8f:
-
-            case 0x90:
-            case 0x91:
-            case 0x92:
-            case 0x93:
-            case 0x94:
-            case 0x95:
-            case 0x96:
-            case 0x97:
-            case 0x98:
-            case 0x99:
-            case 0x9a:
-            case 0x9b:
-            case 0x9c:
-            case 0x9d:
-            case 0x9e:
-            case 0x9f:
-
-            case 0xa0:
-            case 0xa1:
-            case 0xa2:
-            case 0xa3:
-            case 0xa4:
-            case 0xa5:
-            case 0xa6:
-            case 0xa7:
-            case 0xa8:
-            case 0xa9:
-            case 0xaa:
-            case 0xab:
-            case 0xac:
-            case 0xad:
-            case 0xae:
-            case 0xaf:
-
-            case 0xb0:
-            case 0xb1:
-            case 0xb2:
-            case 0xb3:
-            case 0xb4:
-            case 0xb5:
-            case 0xb6:
-            case 0xb7:
-            case 0xb8:
-            case 0xb9:
-            case 0xba:
-            case 0xbb:
-            case 0xbc:
-            case 0xbd:
-            case 0xbe:
-            case 0xbf:
-
-            case 0xc0:
-            case 0xc1:
-            case 0xc2:
-            case 0xc3:
-            case 0xc4:
-            case 0xc5:
-            case 0xc6:
-            case 0xc7:
-            case 0xc8:
-            case 0xc9:
-            case 0xca:
-            case 0xcb:
-            case 0xcc:
-            case 0xcd:
-            case 0xce:
-            case 0xcf:
-
-            case 0xd0:
-            case 0xd1:
-            case 0xd2:
-            case 0xd3:
-            case 0xd4:
-            case 0xd5:
-            case 0xd6:
-            case 0xd7:
-
-            case 'I':
-                return true;
-
-            default:
-                return false;
-        }
-    }
-
-    public void startTop2() {
-        _state = new Top2State();
-    }
-
-    /**
-     * Reads a character.
-     */
-    public void next(int ch)
-            throws IOException {
-        _state = _state.next(ch);
-    }
-
-    void pushStack(State state) {
-        _stateStack.add(state);
-    }
-
-    State popStack() {
-        return _stateStack.remove(_stateStack.size() - 1);
-    }
-
-    void println() {
-        if (!_isNewline) {
-            _dbg.println();
-            _dbg.flush();
-        }
-
-        _isNewline = true;
-        _column = 0;
-    }
-
-    static class ObjectDef {
-        private String _type;
-        private ArrayList<String> _fields;
-
-        ObjectDef(String type, ArrayList<String> fields) {
-            _type = type;
-            _fields = fields;
-        }
-
-        String getType() {
-            return _type;
-        }
-
-        ArrayList<String> getFields() {
-            return _fields;
-        }
-    }
-
-    abstract class State {
-        State _next;
-
-        State() {
-        }
-
-        State(State next) {
-            _next = next;
-        }
-
-        abstract State next(int ch);
-
-        boolean isShift(Object value) {
-            return false;
-        }
-
-        State shift(Object value) {
-            return this;
-        }
-
-        int depth() {
-            if (_next != null)
-                return _next.depth();
-            else
-                return 0;
-        }
-
-        void printIndent(int depth) {
-            if (_isNewline) {
-                for (int i = _column; i < depth() + depth; i++) {
-                    _dbg.print(" ");
-                    _column++;
-                }
-            }
-        }
-
-        void print(String string) {
-            print(0, string);
-        }
-
-        void print(int depth, String string) {
-            printIndent(depth);
-
-            _dbg.print(string);
-            _isNewline = false;
-            _isObject = false;
-
-            int p = string.lastIndexOf('\n');
-            if (p > 0)
-                _column = string.length() - p - 1;
-            else
-                _column += string.length();
-        }
-
-        void println(String string) {
-            println(0, string);
-        }
-
-        void println(int depth, String string) {
-            printIndent(depth);
-
-            _dbg.println(string);
-            _dbg.flush();
-            _isNewline = true;
-            _isObject = false;
-            _column = 0;
-        }
-
-        void println() {
-            if (!_isNewline) {
-                _dbg.println();
-                _dbg.flush();
-            }
-
-            _isNewline = true;
-            _isObject = false;
-            _column = 0;
-        }
-
-        void printObject(String string) {
-            if (_isObject)
-                println();
-
-            printIndent(0);
-
-            _dbg.print(string);
-            _dbg.flush();
-
-            _column += string.length();
-
-            _isNewline = false;
-            _isObject = true;
-        }
-
-        protected State nextObject(int ch) {
-            switch (ch) {
-                case -1:
-                    println();
-                    return this;
-
-                case 'N':
-                    if (isShift(null))
-                        return shift(null);
-                    else {
-                        printObject("null");
-                        return this;
-                    }
-
-                case 'T':
-                    if (isShift(Boolean.TRUE))
-                        return shift(Boolean.TRUE);
-                    else {
-                        printObject("true");
-                        return this;
-                    }
-
-                case 'F':
-                    if (isShift(Boolean.FALSE))
-                        return shift(Boolean.FALSE);
-                    else {
-                        printObject("false");
-                        return this;
-                    }
-
-                case 0x80:
-                case 0x81:
-                case 0x82:
-                case 0x83:
-                case 0x84:
-                case 0x85:
-                case 0x86:
-                case 0x87:
-                case 0x88:
-                case 0x89:
-                case 0x8a:
-                case 0x8b:
-                case 0x8c:
-                case 0x8d:
-                case 0x8e:
-                case 0x8f:
-
-                case 0x90:
-                case 0x91:
-                case 0x92:
-                case 0x93:
-                case 0x94:
-                case 0x95:
-                case 0x96:
-                case 0x97:
-                case 0x98:
-                case 0x99:
-                case 0x9a:
-                case 0x9b:
-                case 0x9c:
-                case 0x9d:
-                case 0x9e:
-                case 0x9f:
-
-                case 0xa0:
-                case 0xa1:
-                case 0xa2:
-                case 0xa3:
-                case 0xa4:
-                case 0xa5:
-                case 0xa6:
-                case 0xa7:
-                case 0xa8:
-                case 0xa9:
-                case 0xaa:
-                case 0xab:
-                case 0xac:
-                case 0xad:
-                case 0xae:
-                case 0xaf:
-
-                case 0xb0:
-                case 0xb1:
-                case 0xb2:
-                case 0xb3:
-                case 0xb4:
-                case 0xb5:
-                case 0xb6:
-                case 0xb7:
-                case 0xb8:
-                case 0xb9:
-                case 0xba:
-                case 0xbb:
-                case 0xbc:
-                case 0xbd:
-                case 0xbe:
-                case 0xbf: {
-                    Integer value = new Integer(ch - 0x90);
-
-                    if (isShift(value))
-                        return shift(value);
-                    else {
-                        printObject(value.toString());
-                        return this;
-                    }
-                }
-
-                case 0xc0:
-                case 0xc1:
-                case 0xc2:
-                case 0xc3:
-                case 0xc4:
-                case 0xc5:
-                case 0xc6:
-                case 0xc7:
-                case 0xc8:
-                case 0xc9:
-                case 0xca:
-                case 0xcb:
-                case 0xcc:
-                case 0xcd:
-                case 0xce:
-                case 0xcf:
-                    return new IntegerState(this, "int", ch - 0xc8, 3);
-
-                case 0xd0:
-                case 0xd1:
-                case 0xd2:
-                case 0xd3:
-                case 0xd4:
-                case 0xd5:
-                case 0xd6:
-                case 0xd7:
-                    return new IntegerState(this, "int", ch - 0xd4, 2);
-
-                case 'I':
-                    return new IntegerState(this, "int");
-
-                case 0xd8:
-                case 0xd9:
-                case 0xda:
-                case 0xdb:
-                case 0xdc:
-                case 0xdd:
-                case 0xde:
-                case 0xdf:
-                case 0xe0:
-                case 0xe1:
-                case 0xe2:
-                case 0xe3:
-                case 0xe4:
-                case 0xe5:
-                case 0xe6:
-                case 0xe7:
-                case 0xe8:
-                case 0xe9:
-                case 0xea:
-                case 0xeb:
-                case 0xec:
-                case 0xed:
-                case 0xee:
-                case 0xef: {
-                    Long value = new Long(ch - 0xe0);
-
-                    if (isShift(value))
-                        return shift(value);
-                    else {
-                        printObject(value.toString() + "L");
-                        return this;
-                    }
-                }
-
-                case 0xf0:
-                case 0xf1:
-                case 0xf2:
-                case 0xf3:
-                case 0xf4:
-                case 0xf5:
-                case 0xf6:
-                case 0xf7:
-                case 0xf8:
-                case 0xf9:
-                case 0xfa:
-                case 0xfb:
-                case 0xfc:
-                case 0xfd:
-                case 0xfe:
-                case 0xff:
-                    return new LongState(this, "long", ch - 0xf8, 7);
-
-                case 0x38:
-                case 0x39:
-                case 0x3a:
-                case 0x3b:
-                case 0x3c:
-                case 0x3d:
-                case 0x3e:
-                case 0x3f:
-                    return new LongState(this, "long", ch - 0x3c, 6);
-
-                case BC_LONG_INT:
-                    return new LongState(this, "long", 0, 4);
-
-                case 'L':
-                    return new LongState(this, "long");
-
-                case 0x5b:
-                case 0x5c: {
-                    Double value = new Double(ch - 0x5b);
-
-                    if (isShift(value))
-                        return shift(value);
-                    else {
-                        printObject(value.toString());
-                        return this;
-                    }
-                }
-
-                case 0x5d:
-                    return new DoubleIntegerState(this, 3);
-
-                case 0x5e:
-                    return new DoubleIntegerState(this, 2);
-
-                case 0x5f:
-                    return new MillsState(this);
-
-                case 'D':
-                    return new DoubleState(this);
-
-                case 'Q':
-                    return new RefState(this);
-
-                case BC_DATE:
-                    return new DateState(this);
-
-                case BC_DATE_MINUTE:
-                    return new DateState(this, true);
-
-                case 0x00: {
-                    String value = "\"\"";
-
-                    if (isShift(value))
-                        return shift(value);
-                    else {
-                        printObject(value.toString());
-                        return this;
-                    }
-                }
-
-                case 0x01:
-                case 0x02:
-                case 0x03:
-                case 0x04:
-                case 0x05:
-                case 0x06:
-                case 0x07:
-                case 0x08:
-                case 0x09:
-                case 0x0a:
-                case 0x0b:
-                case 0x0c:
-                case 0x0d:
-                case 0x0e:
-                case 0x0f:
-
-                case 0x10:
-                case 0x11:
-                case 0x12:
-                case 0x13:
-                case 0x14:
-                case 0x15:
-                case 0x16:
-                case 0x17:
-                case 0x18:
-                case 0x19:
-                case 0x1a:
-                case 0x1b:
-                case 0x1c:
-                case 0x1d:
-                case 0x1e:
-                case 0x1f:
-                    return new StringState(this, 'S', ch);
-
-                case 0x30:
-                case 0x31:
-                case 0x32:
-                case 0x33:
-                    return new StringState(this, 'S', ch - 0x30, true);
-
-                case 'R':
-                    return new StringState(this, 'S', false);
-
-                case 'S':
-                    return new StringState(this, 'S', true);
-
-                case 0x20: {
-                    String value = "binary(0)";
-
-                    if (isShift(value))
-                        return shift(value);
-                    else {
-                        printObject(value.toString());
-                        return this;
-                    }
-                }
-
-                case 0x21:
-                case 0x22:
-                case 0x23:
-                case 0x24:
-                case 0x25:
-                case 0x26:
-                case 0x27:
-                case 0x28:
-                case 0x29:
-                case 0x2a:
-                case 0x2b:
-                case 0x2c:
-                case 0x2d:
-                case 0x2e:
-                case 0x2f:
-                    return new BinaryState(this, 'B', ch - 0x20);
-
-                case 0x34:
-                case 0x35:
-                case 0x36:
-                case 0x37:
-                    return new BinaryState(this, 'B', ch - 0x34, true);
-
-                case 'A':
-                    return new BinaryState(this, 'B', false);
-
-                case 'B':
-                    return new BinaryState(this, 'B', true);
-
-                case 'M':
-                    return new MapState(this, _refId++);
-
-                case 'H':
-                    return new MapState(this, _refId++, false);
-
-                case BC_LIST_VARIABLE:
-                    return new ListState(this, _refId++, true);
-
-                case BC_LIST_VARIABLE_UNTYPED:
-                    return new ListState(this, _refId++, false);
-
-                case BC_LIST_FIXED:
-                    return new CompactListState(this, _refId++, true);
-
-                case BC_LIST_FIXED_UNTYPED:
-                    return new CompactListState(this, _refId++, false);
-
-                case 0x70:
-                case 0x71:
-                case 0x72:
-                case 0x73:
-                case 0x74:
-                case 0x75:
-                case 0x76:
-                case 0x77:
-                    return new CompactListState(this, _refId++, true, ch - 0x70);
-
-                case 0x78:
-                case 0x79:
-                case 0x7a:
-                case 0x7b:
-                case 0x7c:
-                case 0x7d:
-                case 0x7e:
-                case 0x7f:
-                    return new CompactListState(this, _refId++, false, ch - 0x78);
-
-                case 'C':
-                    return new ObjectDefState(this);
-
-                case 0x60:
-                case 0x61:
-                case 0x62:
-                case 0x63:
-                case 0x64:
-                case 0x65:
-                case 0x66:
-                case 0x67:
-                case 0x68:
-                case 0x69:
-                case 0x6a:
-                case 0x6b:
-                case 0x6c:
-                case 0x6d:
-                case 0x6e:
-                case 0x6f:
-                    return new ObjectState(this, _refId++, ch - 0x60);
-
-                case 'O':
-                    return new ObjectState(this, _refId++);
-
-                default:
-                    return this;
-            }
-        }
-    }
-
-    class InitialState extends State {
-        @Override
-        State next(int ch) {
-            println();
-
-            if (ch == 'r') {
-                return new ReplyState(this);
-            } else if (ch == 'c') {
-                return new CallState(this);
-            } else
-                return nextObject(ch);
-        }
-    }
-
-    class Top2State extends State {
-        @Override
-        State next(int ch) {
-            println();
-
-            if (ch == 'R') {
-                return new Reply2State(this);
-            } else if (ch == 'F') {
-                return new Fault2State(this);
-            } else if (ch == 'C') {
-                return new Call2State(this);
-            } else if (ch == 'H') {
-                return new Hessian2State(this);
-            } else if (ch == 'r') {
-                return new ReplyState(this);
-            } else if (ch == 'c') {
-                return new CallState(this);
-            } else
-                return nextObject(ch);
-        }
-    }
-
-    class IntegerState extends State {
-        String _typeCode;
-
-        int _length;
-        int _value;
-
-        IntegerState(State next, String typeCode) {
-            super(next);
-
-            _typeCode = typeCode;
-        }
-
-        IntegerState(State next, String typeCode, int value, int length) {
-            super(next);
-
-            _typeCode = typeCode;
-
-            _value = value;
-            _length = length;
-        }
-
-        @Override
-        State next(int ch) {
-            _value = 256 * _value + (ch & 0xff);
-
-            if (++_length == 4) {
-                Integer value = new Integer(_value);
-
-                if (_next.isShift(value))
-                    return _next.shift(value);
-                else {
-                    printObject(value.toString());
-
-                    return _next;
-                }
-            } else
-                return this;
-        }
-    }
-
-    class LongState extends State {
-        String _typeCode;
-
-        int _length;
-        long _value;
-
-        LongState(State next, String typeCode) {
-            super(next);
-
-            _typeCode = typeCode;
-        }
-
-        LongState(State next, String typeCode, long value, int length) {
-            super(next);
-
-            _typeCode = typeCode;
-
-            _value = value;
-            _length = length;
-        }
-
-        @Override
-        State next(int ch) {
-            _value = 256 * _value + (ch & 0xff);
-
-            if (++_length == 8) {
-                Long value = new Long(_value);
-
-                if (_next.isShift(value))
-                    return _next.shift(value);
-                else {
-                    printObject(value.toString() + "L");
-
-                    return _next;
-                }
-            } else
-                return this;
-        }
-    }
-
-    class DoubleIntegerState extends State {
-        int _length;
-        int _value;
-        boolean _isFirst = true;
-
-        DoubleIntegerState(State next, int length) {
-            super(next);
-
-            _length = length;
-        }
-
-        @Override
-        State next(int ch) {
-            if (_isFirst)
-                _value = (byte) ch;
-            else
-                _value = 256 * _value + (ch & 0xff);
-
-            _isFirst = false;
-
-            if (++_length == 4) {
-                Double value = new Double(_value);
-
-                if (_next.isShift(value))
-                    return _next.shift(value);
-                else {
-                    printObject(value.toString());
-
-                    return _next;
-                }
-            } else
-                return this;
-        }
-    }
-
-    class RefState extends State {
-        String _typeCode;
-
-        int _length;
-        int _value;
-
-        RefState(State next) {
-            super(next);
-        }
-
-        RefState(State next, String typeCode) {
-            super(next);
-
-            _typeCode = typeCode;
-        }
-
-        RefState(State next, String typeCode, int value, int length) {
-            super(next);
-
-            _typeCode = typeCode;
-
-            _value = value;
-            _length = length;
-        }
-
-        @Override
-        boolean isShift(Object o) {
-            return true;
-        }
-
-        @Override
-        State shift(Object o) {
-            println("ref #" + o);
-
-            return _next;
-        }
-
-        @Override
-        State next(int ch) {
-            return nextObject(ch);
-        }
-    }
-
-    class DateState extends State {
-        int _length;
-        long _value;
-        boolean _isMinute;
-
-        DateState(State next) {
-            super(next);
-        }
-
-        DateState(State next, boolean isMinute) {
-            super(next);
-
-            _length = 4;
-            _isMinute = isMinute;
-        }
-
-
-        @Override
-        State next(int ch) {
-            _value = 256 * _value + (ch & 0xff);
-
-            if (++_length == 8) {
-                java.util.Date value;
-
-                if (_isMinute)
-                    value = new java.util.Date(_value * 60000L);
-                else
-                    value = new java.util.Date(_value);
-
-                if (_next.isShift(value))
-                    return _next.shift(value);
-                else {
-                    printObject(value.toString());
-
-                    return _next;
-                }
-            } else
-                return this;
-        }
-    }
-
-    class DoubleState extends State {
-        int _length;
-        long _value;
-
-        DoubleState(State next) {
-            super(next);
-        }
-
-        @Override
-        State next(int ch) {
-            _value = 256 * _value + (ch & 0xff);
-
-            if (++_length == 8) {
-                Double value = Double.longBitsToDouble(_value);
-
-                if (_next.isShift(value))
-                    return _next.shift(value);
-                else {
-                    printObject(value.toString());
-
-                    return _next;
-                }
-            } else
-                return this;
-        }
-    }
-
-    class MillsState extends State {
-        int _length;
-        int _value;
-
-        MillsState(State next) {
-            super(next);
-        }
-
-        @Override
-        State next(int ch) {
-            _value = 256 * _value + (ch & 0xff);
-
-            if (++_length == 4) {
-                Double value = 0.001 * _value;
-
-                if (_next.isShift(value))
-                    return _next.shift(value);
-                else {
-                    printObject(value.toString());
-
-                    return _next;
-                }
-            } else
-                return this;
-        }
-    }
-
-    class StringState extends State {
-        private static final int TOP = 0;
-        private static final int UTF_2_1 = 1;
-        private static final int UTF_3_1 = 2;
-        private static final int UTF_3_2 = 3;
-
-        char _typeCode;
-
-        StringBuilder _value = new StringBuilder();
-        int _lengthIndex;
-        int _length;
-        boolean _isLastChunk;
-
-        int _utfState;
-        char _ch;
-
-        StringState(State next, char typeCode, boolean isLastChunk) {
-            super(next);
-
-            _typeCode = typeCode;
-            _isLastChunk = isLastChunk;
-        }
-
-        StringState(State next, char typeCode, int length) {
-            super(next);
-
-            _typeCode = typeCode;
-            _isLastChunk = true;
-            _length = length;
-            _lengthIndex = 2;
-        }
-
-        StringState(State next, char typeCode, int length, boolean isLastChunk) {
-            super(next);
-
-            _typeCode = typeCode;
-            _isLastChunk = isLastChunk;
-            _length = length;
-            _lengthIndex = 1;
-        }
-
-        @Override
-        State next(int ch) {
-            if (_lengthIndex < 2) {
-                _length = 256 * _length + (ch & 0xff);
-
-                if (++_lengthIndex == 2 && _length == 0 && _isLastChunk) {
-                    if (_next.isShift(_value.toString()))
-                        return _next.shift(_value.toString());
-                    else {
-                        printObject("\"" + _value + "\"");
-                        return _next;
-                    }
-                } else
-                    return this;
-            } else if (_length == 0) {
-                if (ch == 's' || ch == 'x') {
-                    _isLastChunk = false;
-                    _lengthIndex = 0;
-                    return this;
-                } else if (ch == 'S' || ch == 'X') {
-                    _isLastChunk = true;
-                    _lengthIndex = 0;
-                    return this;
-                } else if (ch == 0x00) {
-                    if (_next.isShift(_value.toString()))
-                        return _next.shift(_value.toString());
-                    else {
-                        printObject("\"" + _value + "\"");
-                        return _next;
-                    }
-                } else if (0x00 <= ch && ch < 0x20) {
-                    _isLastChunk = true;
-                    _lengthIndex = 2;
-                    _length = ch & 0xff;
-                    return this;
-                } else if (0x30 <= ch && ch < 0x34) {
-                    _isLastChunk = true;
-                    _lengthIndex = 1;
-                    _length = (ch - 0x30);
-                    return this;
-                } else {
-                    println(String.valueOf((char) ch) + ": unexpected character");
-                    return _next;
-                }
-            }
-
-            switch (_utfState) {
-                case TOP:
-                    if (ch < 0x80) {
-                        _length--;
-
-                        _value.append((char) ch);
-                    } else if (ch < 0xe0) {
-                        _ch = (char) ((ch & 0x1f) << 6);
-                        _utfState = UTF_2_1;
-                    } else {
-                        _ch = (char) ((ch & 0xf) << 12);
-                        _utfState = UTF_3_1;
-                    }
-                    break;
-
-                case UTF_2_1:
-                case UTF_3_2:
-                    _ch += ch & 0x3f;
-                    _value.append(_ch);
-                    _length--;
-                    _utfState = TOP;
-                    break;
-
-                case UTF_3_1:
-                    _ch += (char) ((ch & 0x3f) << 6);
-                    _utfState = UTF_3_2;
-                    break;
-            }
-
-            if (_length == 0 && _isLastChunk) {
-                if (_next.isShift(_value.toString()))
-                    return _next.shift(_value.toString());
-                else {
-                    printObject("\"" + _value + "\"");
-
-                    return _next;
-                }
-            } else
-                return this;
-        }
-    }
-
-    class BinaryState extends State {
-        char _typeCode;
-
-        int _totalLength;
-
-        int _lengthIndex;
-        int _length;
-        boolean _isLastChunk;
-
-        BinaryState(State next, char typeCode, boolean isLastChunk) {
-            super(next);
-
-            _typeCode = typeCode;
-            _isLastChunk = isLastChunk;
-        }
-
-        BinaryState(State next, char typeCode, int length) {
-            super(next);
-
-            _typeCode = typeCode;
-            _isLastChunk = true;
-            _length = length;
-            _lengthIndex = 2;
-        }
-
-        BinaryState(State next, char typeCode, int length, boolean isLastChunk) {
-            super(next);
-
-            _typeCode = typeCode;
-            _isLastChunk = isLastChunk;
-            _length = length;
-            _lengthIndex = 1;
-        }
-
-        @Override
-        State next(int ch) {
-            if (_lengthIndex < 2) {
-                _length = 256 * _length + (ch & 0xff);
-
-                if (++_lengthIndex == 2 && _length == 0 && _isLastChunk) {
-                    String value = "binary(" + _totalLength + ")";
-
-                    if (_next.isShift(value))
-                        return _next.shift(value);
-                    else {
-                        printObject(value);
-                        return _next;
-                    }
-                } else
-                    return this;
-            } else if (_length == 0) {
-                if (ch == 'b') {
-                    _isLastChunk = false;
-                    _lengthIndex = 0;
-                    return this;
-                } else if (ch == 'B') {
-                    _isLastChunk = true;
-                    _lengthIndex = 0;
-                    return this;
-                } else if (ch == 0x20) {
-                    String value = "binary(" + _totalLength + ")";
-
-                    if (_next.isShift(value))
-                        return _next.shift(value);
-                    else {
-                        printObject(value);
-                        return _next;
-                    }
-                } else if (0x20 <= ch && ch < 0x30) {
-                    _isLastChunk = true;
-                    _lengthIndex = 2;
-                    _length = (ch & 0xff) - 0x20;
-                    return this;
-                } else {
-                    println(String.valueOf((char) ch) + ": unexpected character");
-                    return _next;
-                }
-            }
-
-            _length--;
-            _totalLength++;
-
-            if (_length == 0 && _isLastChunk) {
-                String value = "binary(" + _totalLength + ")";
-
-                if (_next.isShift(value))
-                    return _next.shift(value);
-                else {
-                    printObject(value);
-
-                    return _next;
-                }
-            } else
-                return this;
-        }
-    }
-
-    class MapState extends State {
-        private static final int TYPE = 0;
-        private static final int KEY = 1;
-        private static final int VALUE = 2;
-
-        private int _refId;
-
-        private int _state;
-        private int _valueDepth;
-        private boolean _hasData;
-
-        MapState(State next, int refId) {
-            super(next);
-
-            _refId = refId;
-            _state = TYPE;
-        }
-
-        MapState(State next, int refId, boolean isType) {
-            super(next);
-
-            _refId = refId;
-
-            if (isType)
-                _state = TYPE;
-            else {
-                printObject("map (#" + _refId + ")");
-                _state = VALUE;
-            }
-        }
-
-        @Override
-        boolean isShift(Object value) {
-            return _state == TYPE;
-        }
-
-        @Override
-        State shift(Object type) {
-            if (_state == TYPE) {
-                if (type instanceof String) {
-                    _typeDefList.add((String) type);
-                } else if (type instanceof Integer) {
-                    int iValue = (Integer) type;
-
-                    if (iValue >= 0 && iValue < _typeDefList.size())
-                        type = _typeDefList.get(iValue);
-                }
-
-                printObject("map " + type + " (#" + _refId + ")");
-
-                _state = VALUE;
-
-                return this;
-            } else
-                throw new IllegalStateException();
-        }
-
-        @Override
-        int depth() {
-            if (_state == TYPE)
-                return _next.depth();
-            else if (_state == KEY)
-                return _next.depth() + 2;
-            else
-                return _valueDepth;
-        }
-
-        @Override
-        State next(int ch) {
-            switch (_state) {
-                case TYPE:
-                    return nextObject(ch);
-
-                case VALUE:
-                    if (ch == 'Z') {
-                        if (_hasData)
-                            println();
-
-                        return _next;
-                    } else {
-                        if (_hasData)
-                            println();
-
-                        _hasData = true;
-                        _state = KEY;
-
-                        return nextObject(ch);
-                    }
-
-                case KEY:
-                    print(" => ");
-                    _isObject = false;
-                    _valueDepth = _column;
-
-                    _state = VALUE;
-
-                    return nextObject(ch);
-
-                default:
-                    throw new IllegalStateException();
-            }
-        }
-    }
-
-    class ObjectDefState extends State {
-        private static final int TYPE = 1;
-        private static final int COUNT = 2;
-        private static final int FIELD = 3;
-        private static final int COMPLETE = 4;
-
-        private int _refId;
-
-        private int _state;
-        private boolean _hasData;
-        private int _count;
-
-        private String _type;
-        private ArrayList<String> _fields = new ArrayList<String>();
-
-        ObjectDefState(State next) {
-            super(next);
-
-            _state = TYPE;
-        }
-
-        @Override
-        boolean isShift(Object value) {
-            return true;
-        }
-
-        @Override
-        State shift(Object object) {
-            if (_state == TYPE) {
-                _type = (String) object;
-
-                print("/* defun " + _type + " [");
-
-                _objectDefList.add(new ObjectDef(_type, _fields));
-
-                _state = COUNT;
-            } else if (_state == COUNT) {
-                _count = (Integer) object;
-
-                _state = FIELD;
-            } else if (_state == FIELD) {
-                String field = (String) object;
-
-                _count--;
-
-                _fields.add(field);
-
-                if (_fields.size() == 1)
-                    print(field);
-                else
-                    print(", " + field);
-            } else {
-                throw new UnsupportedOperationException();
-            }
-
-            return this;
-        }
-
-        @Override
-        int depth() {
-            if (_state <= TYPE)
-                return _next.depth();
-            else
-                return _next.depth() + 2;
-        }
-
-        @Override
-        State next(int ch) {
-            switch (_state) {
-                case TYPE:
-                    return nextObject(ch);
-
-                case COUNT:
-                    return nextObject(ch);
-
-                case FIELD:
-                    if (_count == 0) {
-                        println("] */");
-                        _next.printIndent(0);
-
-                        return _next.nextObject(ch);
-                    } else
-                        return nextObject(ch);
-
-                default:
-                    throw new IllegalStateException();
-            }
-        }
-    }
-
-    class ObjectState extends State {
-        private static final int TYPE = 0;
-        private static final int FIELD = 1;
-
-        private int _refId;
-
-        private int _state;
-        private ObjectDef _def;
-        private int _count;
-        private int _fieldDepth;
-
-        ObjectState(State next, int refId) {
-            super(next);
-
-            _refId = refId;
-            _state = TYPE;
-        }
-
-        ObjectState(State next, int refId, int def) {
-            super(next);
-
-            _refId = refId;
-            _state = FIELD;
-
-            if (def < 0 || _objectDefList.size() <= def) {
-                throw new IllegalStateException(def + " is an unknown object type");
-            }
-
-            _def = _objectDefList.get(def);
-
-            println("object " + _def.getType() + " (#" + _refId + ")");
-        }
-
-        @Override
-        boolean isShift(Object value) {
-            if (_state == TYPE)
-                return true;
-            else
-                return false;
-        }
-
-        @Override
-        State shift(Object object) {
-            if (_state == TYPE) {
-                int def = (Integer) object;
-
-                _def = _objectDefList.get(def);
-
-                println("object " + _def.getType() + " (#" + _refId + ")");
-
-                _state = FIELD;
-
-                if (_def.getFields().size() == 0)
-                    return _next;
-            }
-
-            return this;
-        }
-
-        @Override
-        int depth() {
-            if (_state <= TYPE)
-                return _next.depth();
-            else
-                return _fieldDepth;
-        }
-
-        @Override
-        State next(int ch) {
-            switch (_state) {
-                case TYPE:
-                    return nextObject(ch);
-
-                case FIELD:
-                    if (_def.getFields().size() <= _count)
-                        return _next.next(ch);
-
-                    _fieldDepth = _next.depth() + 2;
-                    println();
-                    print(_def.getFields().get(_count++) + ": ");
-
-                    _fieldDepth = _column;
-
-                    _isObject = false;
-                    return nextObject(ch);
-
-                default:
-                    throw new IllegalStateException();
-            }
-        }
-    }
-
-    class ListState extends State {
-        private static final int TYPE = 0;
-        private static final int LENGTH = 1;
-        private static final int VALUE = 2;
-
-        private int _refId;
-
-        private int _state;
-        private boolean _hasData;
-        private int _count;
-        private int _valueDepth;
-
-        ListState(State next, int refId, boolean isType) {
-            super(next);
-
-            _refId = refId;
-
-            if (isType)
-                _state = TYPE;
-            else {
-                printObject("list (#" + _refId + ")");
-                _state = VALUE;
-            }
-        }
-
-        @Override
-        boolean isShift(Object value) {
-            return _state == TYPE || _state == LENGTH;
-        }
-
-        @Override
-        State shift(Object object) {
-            if (_state == TYPE) {
-                Object type = object;
-
-                if (type instanceof String) {
-                    _typeDefList.add((String) type);
-                } else if (object instanceof Integer) {
-                    int index = (Integer) object;
-
-                    if (index >= 0 && index < _typeDefList.size())
-                        type = _typeDefList.get(index);
-                    else
-                        type = "type-unknown(" + index + ")";
-                }
-
-                printObject("list " + type + "(#" + _refId + ")");
-
-                _state = VALUE;
-
-                return this;
-            } else if (_state == LENGTH) {
-                _state = VALUE;
-
-                return this;
-            } else
-                return this;
-        }
-
-        @Override
-        int depth() {
-            if (_state <= LENGTH)
-                return _next.depth();
-            else if (_state == VALUE)
-                return _valueDepth;
-            else
-                return _next.depth() + 2;
-        }
-
-        @Override
-        State next(int ch) {
-            switch (_state) {
-                case TYPE:
-                    return nextObject(ch);
-
-                case VALUE:
-                    if (ch == 'Z') {
-                        if (_count > 0)
-                            println();
-
-                        return _next;
-                    } else {
-                        _valueDepth = _next.depth() + 2;
-                        println();
-                        printObject(_count++ + ": ");
-                        _valueDepth = _column;
-                        _isObject = false;
-
-                        return nextObject(ch);
-                    }
-
-                default:
-                    throw new IllegalStateException();
-            }
-        }
-    }
-
-    class CompactListState extends State {
-        private static final int TYPE = 0;
-        private static final int LENGTH = 1;
-        private static final int VALUE = 2;
-
-        private int _refId;
-
-        private boolean _isTyped;
-        private boolean _isLength;
-
-        private int _state;
-        private boolean _hasData;
-        private int _length;
-        private int _count;
-        private int _valueDepth;
-
-        CompactListState(State next, int refId, boolean isTyped) {
-            super(next);
-
-            _isTyped = isTyped;
-            _refId = refId;
-
-            if (isTyped)
-                _state = TYPE;
-            else
-                _state = LENGTH;
-        }
-
-        CompactListState(State next, int refId, boolean isTyped, int length) {
-            super(next);
-
-            _isTyped = isTyped;
-            _refId = refId;
-            _length = length;
-
-            _isLength = true;
-
-            if (isTyped)
-                _state = TYPE;
-            else {
-                printObject("list (#" + _refId + ")");
-
-                _state = VALUE;
-            }
-        }
-
-        @Override
-        boolean isShift(Object value) {
-            return _state == TYPE || _state == LENGTH;
-        }
-
-        @Override
-        State shift(Object object) {
-            if (_state == TYPE) {
-                Object type = object;
-
-                if (object instanceof Integer) {
-                    int index = (Integer) object;
-
-                    if (index >= 0 && index < _typeDefList.size())
-                        type = _typeDefList.get(index);
-                    else
-                        type = "type-unknown(" + index + ")";
-                } else if (object instanceof String)
-                    _typeDefList.add((String) object);
-
-                printObject("list " + type + " (#" + _refId + ")");
-
-                if (_isLength) {
-                    _state = VALUE;
-
-                    if (_length == 0)
-                        return _next;
-                } else
-                    _state = LENGTH;
-
-                return this;
-            } else if (_state == LENGTH) {
-                _length = (Integer) object;
-
-                if (!_isTyped)
-                    printObject("list (#" + _refId + ")");
-
-                _state = VALUE;
-
-                if (_length == 0)
-                    return _next;
-                else
-                    return this;
-            } else
-                return this;
-        }
-
-        @Override
-        int depth() {
-            if (_state <= LENGTH)
-                return _next.depth();
-            else if (_state == VALUE)
-                return _valueDepth;
-            else
-                return _next.depth() + 2;
-        }
-
-        @Override
-        State next(int ch) {
-            switch (_state) {
-                case TYPE:
-                    return nextObject(ch);
-
-                case LENGTH:
-                    return nextObject(ch);
-
-                case VALUE:
-                    if (_length <= _count)
-                        return _next.next(ch);
-                    else {
-                        _valueDepth = _next.depth() + 2;
-                        println();
-                        printObject(_count++ + ": ");
-                        _valueDepth = _column;
-                        _isObject = false;
-
-                        return nextObject(ch);
-                    }
-
-                default:
-                    throw new IllegalStateException();
-            }
-        }
-    }
-
-    class Hessian2State extends State {
-        private static final int MAJOR = 0;
-        private static final int MINOR = 1;
-
-        private int _state;
-        private int _major;
-        private int _minor;
-
-        Hessian2State(State next) {
-            super(next);
-        }
-
-        @Override
-        int depth() {
-            return _next.depth() + 2;
-        }
-
-        @Override
-        State next(int ch) {
-            switch (_state) {
-                case MAJOR:
-                    _major = ch;
-                    _state = MINOR;
-                    return this;
-
-                case MINOR:
-                    _minor = ch;
-                    println(-2, "hessian " + _major + "." + _minor);
-                    return _next;
-
-                default:
-                    throw new IllegalStateException();
-            }
-        }
-    }
-
-    class CallState extends State {
-        private static final int MAJOR = 0;
-        private static final int MINOR = 1;
-        private static final int HEADER = 2;
-        private static final int METHOD = 3;
-        private static final int VALUE = 4;
-        private static final int ARG = 5;
-
-        private int _state;
-        private int _major;
-        private int _minor;
-
-        CallState(State next) {
-            super(next);
-        }
-
-        @Override
-        int depth() {
-            return _next.depth() + 2;
-        }
-
-        @Override
-        State next(int ch) {
-            switch (_state) {
-                case MAJOR:
-                    _major = ch;
-                    _state = MINOR;
-                    return this;
-
-                case MINOR:
-                    _minor = ch;
-                    _state = HEADER;
-                    println(-2, "call " + _major + "." + _minor);
-                    return this;
-
-                case HEADER:
-                    if (ch == 'H') {
-                        println();
-                        print("header ");
-                        _isObject = false;
-                        _state = VALUE;
-                        return new StringState(this, 'H', true);
-                    } else if (ch == 'm') {
-                        println();
-                        print("method ");
-                        _isObject = false;
-                        _state = ARG;
-                        return new StringState(this, 'm', true);
-                    } else {
-                        println((char) ch + ": unexpected char");
-                        return popStack();
-                    }
-
-                case VALUE:
-                    print(" => ");
-                    _isObject = false;
-                    _state = HEADER;
-                    return nextObject(ch);
-
-                case ARG:
-                    if (ch == 'Z')
-                        return _next;
-                    else
-                        return nextObject(ch);
-
-                default:
-                    throw new IllegalStateException();
-            }
-        }
-    }
-
-    class Call2State extends State {
-        private static final int METHOD = 0;
-        private static final int COUNT = 1;
-        private static final int ARG = 2;
-
-        private int _state = METHOD;
-        private int _i;
-        private int _count;
-
-        Call2State(State next) {
-            super(next);
-        }
-
-        @Override
-        int depth() {
-            return _next.depth() + 5;
-        }
-
-        @Override
-        boolean isShift(Object value) {
-            return _state != ARG;
-        }
-
-        @Override
-        State shift(Object object) {
-            if (_state == METHOD) {
-                println(-5, "Call " + object);
-
-                _state = COUNT;
-                return this;
-            } else if (_state == COUNT) {
-                Integer count = (Integer) object;
-
-                _count = count;
-
-                _state = ARG;
-
-                if (_count == 0)
-                    return _next;
-                else
-                    return this;
-            } else
-                return this;
-        }
-
-        @Override
-        State next(int ch) {
-            switch (_state) {
-                case COUNT:
-                    return nextObject(ch);
-
-                case METHOD:
-                    return nextObject(ch);
-
-                case ARG:
-                    if (_count <= _i)
-                        return _next.next(ch);
-                    else {
-                        println();
-                        print(-3, _i++ + ": ");
-
-                        return nextObject(ch);
-                    }
-
-                default:
-                    throw new IllegalStateException();
-            }
-        }
-    }
-
-    class ReplyState extends State {
-        private static final int MAJOR = 0;
-        private static final int MINOR = 1;
-        private static final int HEADER = 2;
-        private static final int VALUE = 3;
-        private static final int END = 4;
-
-        private int _state;
-        private int _major;
-        private int _minor;
-
-        ReplyState(State next) {
-            _next = next;
-        }
-
-        @Override
-        int depth() {
-            return _next.depth() + 2;
-        }
-
-        @Override
-        State next(int ch) {
-            switch (_state) {
-                case MAJOR:
-                    if (ch == 't' || ch == 'S')
-                        return new RemoteState(this).next(ch);
-
-                    _major = ch;
-                    _state = MINOR;
-                    return this;
-
-                case MINOR:
-                    _minor = ch;
-                    _state = HEADER;
-                    println(-2, "reply " + _major + "." + _minor);
-                    return this;
-
-                case HEADER:
-                    if (ch == 'H') {
-                        _state = VALUE;
-                        return new StringState(this, 'H', true);
-                    } else if (ch == 'f') {
-                        print("fault ");
-                        _isObject = false;
-                        _state = END;
-                        return new MapState(this, 0);
-                    } else {
-                        _state = END;
-                        return nextObject(ch);
-                    }
-
-                case VALUE:
-                    _state = HEADER;
-                    return nextObject(ch);
-
-                case END:
-                    println();
-                    if (ch == 'Z') {
-                        return _next;
-                    } else
-                        return _next.next(ch);
-
-                default:
-                    throw new IllegalStateException();
-            }
-        }
-    }
-
-    class Reply2State extends State {
-        Reply2State(State next) {
-            super(next);
-
-            println(-2, "Reply");
-        }
-
-        @Override
-        int depth() {
-            return _next.depth() + 2;
-        }
-
-        @Override
-        State next(int ch) {
-            return nextObject(ch);
-        }
-    }
-
-    class Fault2State extends State {
-        Fault2State(State next) {
-            super(next);
-
-            println(-2, "Fault");
-        }
-
-        @Override
-        int depth() {
-            return _next.depth() + 2;
-        }
-
-        @Override
-        State next(int ch) {
-            return nextObject(ch);
-        }
-    }
-
-    class IndirectState extends State {
-        IndirectState(State next) {
-            super(next);
-        }
-
-        @Override
-        boolean isShift(Object object) {
-            return _next.isShift(object);
-        }
-
-        @Override
-        State shift(Object object) {
-            return _next.shift(object);
-        }
-
-        @Override
-        State next(int ch) {
-            return nextObject(ch);
-        }
-    }
-
-    class RemoteState extends State {
-        private static final int TYPE = 0;
-        private static final int VALUE = 1;
-        private static final int END = 2;
-
-        private int _state;
-        private int _major;
-        private int _minor;
-
-        RemoteState(State next) {
-            super(next);
-        }
-
-        @Override
-        State next(int ch) {
-            switch (_state) {
-                case TYPE:
-                    println(-1, "remote");
-                    if (ch == 't') {
-                        _state = VALUE;
-                        return new StringState(this, 't', false);
-                    } else {
-                        _state = END;
-                        return nextObject(ch);
-                    }
-
-                case VALUE:
-                    _state = END;
-                    return _next.nextObject(ch);
-
-                case END:
-                    return _next.next(ch);
-
-                default:
-                    throw new IllegalStateException();
-            }
-        }
-    }
-
-    class StreamingState extends State {
-        private int _digit;
-        private int _length;
-        private boolean _isLast;
-        private boolean _isFirst = true;
-
-        private State _childState;
-
-        StreamingState(State next, boolean isLast) {
-            super(next);
-
-            _isLast = isLast;
-            _childState = new InitialState();
-        }
-
-        @Override
-        State next(int ch) {
-            if (_digit < 2) {
-                _length = 256 * _length + ch;
-                _digit++;
-
-                if (_digit == 2 && _length == 0 && _isLast) {
-                    _refId = 0;
-                    return _next;
-                } else {
-                    if (_digit == 2)
-                        println(-1, "packet-start(" + _length + ")");
-
-                    return this;
-                }
-            } else if (_length == 0) {
-                _isLast = (ch == 'P');
-                _digit = 0;
-
-                return this;
-            }
-
-            _childState = _childState.next(ch);
-
-            _length--;
-
-            if (_length == 0 && _isLast) {
-                println(-1, "");
-                println(-1, "packet-end");
-                _refId = 0;
-                return _next;
-            } else
-                return this;
-        }
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianEnvelope.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianEnvelope.java
deleted file mode 100644
index 21bd3a7713..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianEnvelope.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-
-/**
- * Factory class for wrapping and unwrapping hessian streams.
- */
-abstract public class HessianEnvelope {
-    /**
-     * Wrap the Hessian output stream in an envelope.
-     */
-    abstract public Hessian2Output wrap(Hessian2Output out)
-            throws IOException;
-
-    /**
-     * Unwrap the Hessian input stream with this envelope.  It is an
-     * error if the actual envelope does not match the expected envelope
-     * class.
-     */
-    abstract public Hessian2Input unwrap(Hessian2Input in)
-            throws IOException;
-
-    /**
-     * Unwrap the envelope after having read the envelope code ('E') and
-     * the envelope method.  Called by the EnvelopeFactory for dynamic
-     * reading of the envelopes.
-     */
-    abstract public Hessian2Input unwrapHeaders(Hessian2Input in)
-            throws IOException;
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianFieldException.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianFieldException.java
deleted file mode 100644
index bc5f9a0bf3..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianFieldException.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-/**
- * Exception during field reading.
- */
-public class HessianFieldException extends HessianProtocolException {
-    /**
-     * Zero-arg constructor.
-     */
-    public HessianFieldException() {
-    }
-
-    /**
-     * Create the exception.
-     */
-    public HessianFieldException(String message) {
-        super(message);
-    }
-
-    /**
-     * Create the exception.
-     */
-    public HessianFieldException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    /**
-     * Create the exception.
-     */
-    public HessianFieldException(Throwable cause) {
-        super(cause);
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianHandle.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianHandle.java
deleted file mode 100644
index 3103a871f7..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianHandle.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-/**
- * Marks a type as a handle
- */
-public interface HessianHandle {
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianInput.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianInput.java
deleted file mode 100644
index 417b7564aa..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianInput.java
+++ /dev/null
@@ -1,1712 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-
-/**
- * Input stream for Hessian requests.
- * <p>
- * <p>HessianInput is unbuffered, so any client needs to provide
- * its own buffering.
- * <p>
- * <pre>
- * InputStream is = ...; // from http connection
- * HessianInput in = new HessianInput(is);
- * String value;
- *
- * in.startReply();         // read reply header
- * value = in.readString(); // read string value
- * in.completeReply();      // read reply footer
- * </pre>
- */
-public class HessianInput extends AbstractHessianInput {
-    private static int END_OF_DATA = -2;
-
-    private static Field _detailMessageField;
-
-    static {
-        try {
-            _detailMessageField = Throwable.class.getDeclaredField("detailMessage");
-            _detailMessageField.setAccessible(true);
-        } catch (Throwable e) {
-        }
-    }
-
-    // factory for deserializing objects in the input stream
-    protected SerializerFactory _serializerFactory;
-    protected ArrayList _refs;
-    // a peek character
-    protected int _peek = -1;
-    // the underlying input stream
-    private InputStream _is;
-    // the method for a call
-    private String _method;
-    private Reader _chunkReader;
-    private InputStream _chunkInputStream;
-    private Throwable _replyFault;
-    private StringBuffer _sbuf = new StringBuffer();
-    // true if this is the last chunk
-    private boolean _isLastChunk;
-    // the chunk length
-    private int _chunkLength;
-
-    /**
-     * Creates an uninitialized Hessian input stream.
-     */
-    public HessianInput() {
-    }
-
-    /**
-     * Creates a new Hessian input stream, initialized with an
-     * underlying input stream.
-     *
-     * @param is the underlying input stream.
-     */
-    public HessianInput(InputStream is) {
-        init(is);
-    }
-
-    /**
-     * Gets the serializer factory.
-     */
-    public SerializerFactory getSerializerFactory() {
-        return _serializerFactory;
-    }
-
-    /**
-     * Sets the serializer factory.
-     */
-    @Override
-    public void setSerializerFactory(SerializerFactory factory) {
-        _serializerFactory = factory;
-    }
-
-    /**
-     * Initialize the hessian stream with the underlying input stream.
-     */
-    @Override
-    public void init(InputStream is) {
-        _is = is;
-        _method = null;
-        _isLastChunk = true;
-        _chunkLength = 0;
-        _peek = -1;
-        _refs = null;
-        _replyFault = null;
-
-        if (_serializerFactory == null)
-            _serializerFactory = new SerializerFactory();
-    }
-
-    /**
-     * Returns the calls method
-     */
-    @Override
-    public String getMethod() {
-        return _method;
-    }
-
-    /**
-     * Returns any reply fault.
-     */
-    public Throwable getReplyFault() {
-        return _replyFault;
-    }
-
-    /**
-     * Starts reading the call
-     * <p>
-     * <pre>
-     * c major minor
-     * </pre>
-     */
-    @Override
-    public int readCall()
-            throws IOException {
-        int tag = read();
-
-        if (tag != 'c')
-            throw error("expected hessian call ('c') at " + codeName(tag));
-
-        int major = read();
-        int minor = read();
-
-        return (major << 16) + minor;
-    }
-
-    /**
-     * For backward compatibility with HessianSkeleton
-     */
-    @Override
-    public void skipOptionalCall()
-            throws IOException {
-        int tag = read();
-
-        if (tag == 'c') {
-            read();
-            read();
-        } else
-            _peek = tag;
-    }
-
-    /**
-     * Starts reading the call
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * m b16 b8 method
-     * </pre>
-     */
-    @Override
-    public String readMethod()
-            throws IOException {
-        int tag = read();
-
-        if (tag != 'm')
-            throw error("expected hessian method ('m') at " + codeName(tag));
-        int d1 = read();
-        int d2 = read();
-
-        _isLastChunk = true;
-        _chunkLength = d1 * 256 + d2;
-        _sbuf.setLength(0);
-        int ch;
-        while ((ch = parseChar()) >= 0)
-            _sbuf.append((char) ch);
-
-        _method = _sbuf.toString();
-
-        return _method;
-    }
-
-    /**
-     * Starts reading the call, including the headers.
-     * <p>
-     * <p>The call expects the following protocol data
-     * <p>
-     * <pre>
-     * c major minor
-     * m b16 b8 method
-     * </pre>
-     */
-    @Override
-    public void startCall()
-            throws IOException {
-        readCall();
-
-        while (readHeader() != null) {
-            readObject();
-        }
-
-        readMethod();
-    }
-
-    /**
-     * Completes reading the call
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * z
-     * </pre>
-     */
-    @Override
-    public void completeCall()
-            throws IOException {
-        int tag = read();
-
-        if (tag == 'z') {
-        } else
-            throw error("expected end of call ('z') at " + codeName(tag) + ".  Check method arguments and ensure method overloading is enabled if necessary");
-    }
-
-    /**
-     * Reads a reply as an object.
-     * If the reply has a fault, throws the exception.
-     */
-    @Override
-    public Object readReply(Class expectedClass)
-            throws Throwable {
-        int tag = read();
-
-        if (tag != 'r')
-            error("expected hessian reply at " + codeName(tag));
-
-        int major = read();
-        int minor = read();
-
-        tag = read();
-        if (tag == 'f')
-            throw prepareFault();
-        else {
-            _peek = tag;
-
-            Object value = readObject(expectedClass);
-
-            completeValueReply();
-
-            return value;
-        }
-    }
-
-    /**
-     * Starts reading the reply
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * r
-     * </pre>
-     */
-    @Override
-    public void startReply()
-            throws Throwable {
-        int tag = read();
-
-        if (tag != 'r')
-            error("expected hessian reply at " + codeName(tag));
-
-        int major = read();
-        int minor = read();
-
-        tag = read();
-        if (tag == 'f')
-            throw prepareFault();
-        else
-            _peek = tag;
-    }
-
-    /**
-     * Prepares the fault.
-     */
-    private Throwable prepareFault()
-            throws IOException {
-        HashMap fault = readFault();
-
-        Object detail = fault.get("detail");
-        String message = (String) fault.get("message");
-
-        if (detail instanceof Throwable) {
-            _replyFault = (Throwable) detail;
-
-            if (message != null && _detailMessageField != null) {
-                try {
-                    _detailMessageField.set(_replyFault, message);
-                } catch (Throwable e) {
-                }
-            }
-
-            return _replyFault;
-        } else {
-            String code = (String) fault.get("code");
-
-            _replyFault = new HessianServiceException(message, code, detail);
-
-            return _replyFault;
-        }
-    }
-
-    /**
-     * Completes reading the call
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * z
-     * </pre>
-     */
-    @Override
-    public void completeReply()
-            throws IOException {
-        int tag = read();
-
-        if (tag != 'z')
-            error("expected end of reply at " + codeName(tag));
-    }
-
-    /**
-     * Completes reading the call
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * z
-     * </pre>
-     */
-    public void completeValueReply()
-            throws IOException {
-        int tag = read();
-
-        if (tag != 'z')
-            error("expected end of reply at " + codeName(tag));
-    }
-
-    /**
-     * Reads a header, returning null if there are no headers.
-     * <p>
-     * <pre>
-     * H b16 b8 value
-     * </pre>
-     */
-    @Override
-    public String readHeader()
-            throws IOException {
-        int tag = read();
-
-        if (tag == 'H') {
-            _isLastChunk = true;
-            _chunkLength = (read() << 8) + read();
-
-            _sbuf.setLength(0);
-            int ch;
-            while ((ch = parseChar()) >= 0)
-                _sbuf.append((char) ch);
-
-            return _sbuf.toString();
-        }
-
-        _peek = tag;
-
-        return null;
-    }
-
-    /**
-     * Reads a null
-     * <p>
-     * <pre>
-     * N
-     * </pre>
-     */
-    @Override
-    public void readNull()
-            throws IOException {
-        int tag = read();
-
-        switch (tag) {
-            case 'N':
-                return;
-
-            default:
-                throw expect("null", tag);
-        }
-    }
-
-    /**
-     * Reads a byte
-     *
-     * <pre>
-     * I b32 b24 b16 b8
-     * </pre>
-     */
-  /*
-  public byte readByte()
-    throws IOException
-  {
-    return (byte) readInt();
-  }
-  */
-
-    /**
-     * Reads a boolean
-     * <p>
-     * <pre>
-     * T
-     * F
-     * </pre>
-     */
-    @Override
-    public boolean readBoolean()
-            throws IOException {
-        int tag = read();
-
-        switch (tag) {
-            case 'T':
-                return true;
-            case 'F':
-                return false;
-            case 'I':
-                return parseInt() == 0;
-            case 'L':
-                return parseLong() == 0;
-            case 'D':
-                return parseDouble() == 0.0;
-            case 'N':
-                return false;
-
-            default:
-                throw expect("boolean", tag);
-        }
-    }
-
-    /**
-     * Reads a short
-     * <p>
-     * <pre>
-     * I b32 b24 b16 b8
-     * </pre>
-     */
-    public short readShort()
-            throws IOException {
-        return (short) readInt();
-    }
-
-    /**
-     * Reads an integer
-     * <p>
-     * <pre>
-     * I b32 b24 b16 b8
-     * </pre>
-     */
-    @Override
-    public int readInt()
-            throws IOException {
-        int tag = read();
-
-        switch (tag) {
-            case 'T':
-                return 1;
-            case 'F':
-                return 0;
-            case 'I':
-                return parseInt();
-            case 'L':
-                return (int) parseLong();
-            case 'D':
-                return (int) parseDouble();
-
-            default:
-                throw expect("int", tag);
-        }
-    }
-
-    /**
-     * Reads a long
-     * <p>
-     * <pre>
-     * L b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre>
-     */
-    @Override
-    public long readLong()
-            throws IOException {
-        int tag = read();
-
-        switch (tag) {
-            case 'T':
-                return 1;
-            case 'F':
-                return 0;
-            case 'I':
-                return parseInt();
-            case 'L':
-                return parseLong();
-            case 'D':
-                return (long) parseDouble();
-
-            default:
-                throw expect("long", tag);
-        }
-    }
-
-    /**
-     * Reads a float
-     * <p>
-     * <pre>
-     * D b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre>
-     */
-    public float readFloat()
-            throws IOException {
-        return (float) readDouble();
-    }
-
-    /**
-     * Reads a double
-     * <p>
-     * <pre>
-     * D b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre>
-     */
-    @Override
-    public double readDouble()
-            throws IOException {
-        int tag = read();
-
-        switch (tag) {
-            case 'T':
-                return 1;
-            case 'F':
-                return 0;
-            case 'I':
-                return parseInt();
-            case 'L':
-                return (double) parseLong();
-            case 'D':
-                return parseDouble();
-
-            default:
-                throw expect("long", tag);
-        }
-    }
-
-    /**
-     * Reads a date.
-     * <p>
-     * <pre>
-     * T b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre>
-     */
-    @Override
-    public long readUTCDate()
-            throws IOException {
-        int tag = read();
-
-        if (tag != 'd')
-            throw error("expected date at " + codeName(tag));
-
-        long b64 = read();
-        long b56 = read();
-        long b48 = read();
-        long b40 = read();
-        long b32 = read();
-        long b24 = read();
-        long b16 = read();
-        long b8 = read();
-
-        return ((b64 << 56) +
-                (b56 << 48) +
-                (b48 << 40) +
-                (b40 << 32) +
-                (b32 << 24) +
-                (b24 << 16) +
-                (b16 << 8) +
-                b8);
-    }
-
-    /**
-     * Reads a byte from the stream.
-     */
-    public int readChar()
-            throws IOException {
-        if (_chunkLength > 0) {
-            _chunkLength--;
-            if (_chunkLength == 0 && _isLastChunk)
-                _chunkLength = END_OF_DATA;
-
-            int ch = parseUTF8Char();
-            return ch;
-        } else if (_chunkLength == END_OF_DATA) {
-            _chunkLength = 0;
-            return -1;
-        }
-
-        int tag = read();
-
-        switch (tag) {
-            case 'N':
-                return -1;
-
-            case 'S':
-            case 's':
-            case 'X':
-            case 'x':
-                _isLastChunk = tag == 'S' || tag == 'X';
-                _chunkLength = (read() << 8) + read();
-
-                _chunkLength--;
-                int value = parseUTF8Char();
-
-                // special code so successive read byte won't
-                // be read as a single object.
-                if (_chunkLength == 0 && _isLastChunk)
-                    _chunkLength = END_OF_DATA;
-
-                return value;
-
-            default:
-                throw new IOException("expected 'S' at " + (char) tag);
-        }
-    }
-
-    /**
-     * Reads a byte array from the stream.
-     */
-    public int readString(char[] buffer, int offset, int length)
-            throws IOException {
-        int readLength = 0;
-
-        if (_chunkLength == END_OF_DATA) {
-            _chunkLength = 0;
-            return -1;
-        } else if (_chunkLength == 0) {
-            int tag = read();
-
-            switch (tag) {
-                case 'N':
-                    return -1;
-
-                case 'S':
-                case 's':
-                case 'X':
-                case 'x':
-                    _isLastChunk = tag == 'S' || tag == 'X';
-                    _chunkLength = (read() << 8) + read();
-                    break;
-
-                default:
-                    throw new IOException("expected 'S' at " + (char) tag);
-            }
-        }
-
-        while (length > 0) {
-            if (_chunkLength > 0) {
-                buffer[offset++] = (char) parseUTF8Char();
-                _chunkLength--;
-                length--;
-                readLength++;
-            } else if (_isLastChunk) {
-                if (readLength == 0)
-                    return -1;
-                else {
-                    _chunkLength = END_OF_DATA;
-                    return readLength;
-                }
-            } else {
-                int tag = read();
-
-                switch (tag) {
-                    case 'S':
-                    case 's':
-                    case 'X':
-                    case 'x':
-                        _isLastChunk = tag == 'S' || tag == 'X';
-                        _chunkLength = (read() << 8) + read();
-                        break;
-
-                    default:
-                        throw new IOException("expected 'S' at " + (char) tag);
-                }
-            }
-        }
-
-        if (readLength == 0)
-            return -1;
-        else if (_chunkLength > 0 || !_isLastChunk)
-            return readLength;
-        else {
-            _chunkLength = END_OF_DATA;
-            return readLength;
-        }
-    }
-
-    /**
-     * Reads a string
-     * <p>
-     * <pre>
-     * S b16 b8 string value
-     * </pre>
-     */
-    @Override
-    public String readString()
-            throws IOException {
-        int tag = read();
-
-        switch (tag) {
-            case 'N':
-                return null;
-
-            case 'I':
-                return String.valueOf(parseInt());
-            case 'L':
-                return String.valueOf(parseLong());
-            case 'D':
-                return String.valueOf(parseDouble());
-
-            case 'S':
-            case 's':
-            case 'X':
-            case 'x':
-                _isLastChunk = tag == 'S' || tag == 'X';
-                _chunkLength = (read() << 8) + read();
-
-                _sbuf.setLength(0);
-                int ch;
-
-                while ((ch = parseChar()) >= 0)
-                    _sbuf.append((char) ch);
-
-                return _sbuf.toString();
-
-            default:
-                throw expect("string", tag);
-        }
-    }
-
-    /**
-     * Reads an XML node.
-     * <p>
-     * <pre>
-     * S b16 b8 string value
-     * </pre>
-     */
-    @Override
-    public org.w3c.dom.Node readNode()
-            throws IOException {
-        int tag = read();
-
-        switch (tag) {
-            case 'N':
-                return null;
-
-            case 'S':
-            case 's':
-            case 'X':
-            case 'x':
-                _isLastChunk = tag == 'S' || tag == 'X';
-                _chunkLength = (read() << 8) + read();
-
-                throw error("Can't handle string in this context");
-
-            default:
-                throw expect("string", tag);
-        }
-    }
-
-    /**
-     * Reads a byte array
-     * <p>
-     * <pre>
-     * B b16 b8 data value
-     * </pre>
-     */
-    @Override
-    public byte[] readBytes()
-            throws IOException {
-        int tag = read();
-
-        switch (tag) {
-            case 'N':
-                return null;
-
-            case 'B':
-            case 'b':
-                _isLastChunk = tag == 'B';
-                _chunkLength = (read() << 8) + read();
-
-                ByteArrayOutputStream bos = new ByteArrayOutputStream();
-
-                int data;
-                while ((data = parseByte()) >= 0)
-                    bos.write(data);
-
-                return bos.toByteArray();
-
-            default:
-                throw expect("bytes", tag);
-        }
-    }
-
-    /**
-     * Reads a byte from the stream.
-     */
-    public int readByte()
-            throws IOException {
-        if (_chunkLength > 0) {
-            _chunkLength--;
-            if (_chunkLength == 0 && _isLastChunk)
-                _chunkLength = END_OF_DATA;
-
-            return read();
-        } else if (_chunkLength == END_OF_DATA) {
-            _chunkLength = 0;
-            return -1;
-        }
-
-        int tag = read();
-
-        switch (tag) {
-            case 'N':
-                return -1;
-
-            case 'B':
-            case 'b':
-                _isLastChunk = tag == 'B';
-                _chunkLength = (read() << 8) + read();
-
-                int value = parseByte();
-
-                // special code so successive read byte won't
-                // be read as a single object.
-                if (_chunkLength == 0 && _isLastChunk)
-                    _chunkLength = END_OF_DATA;
-
-                return value;
-
-            default:
-                throw new IOException("expected 'B' at " + (char) tag);
-        }
-    }
-
-    /**
-     * Reads a byte array from the stream.
-     */
-    public int readBytes(byte[] buffer, int offset, int length)
-            throws IOException {
-        int readLength = 0;
-
-        if (_chunkLength == END_OF_DATA) {
-            _chunkLength = 0;
-            return -1;
-        } else if (_chunkLength == 0) {
-            int tag = read();
-
-            switch (tag) {
-                case 'N':
-                    return -1;
-
-                case 'B':
-                case 'b':
-                    _isLastChunk = tag == 'B';
-                    _chunkLength = (read() << 8) + read();
-                    break;
-
-                default:
-                    throw new IOException("expected 'B' at " + (char) tag);
-            }
-        }
-
-        while (length > 0) {
-            if (_chunkLength > 0) {
-                buffer[offset++] = (byte) read();
-                _chunkLength--;
-                length--;
-                readLength++;
-            } else if (_isLastChunk) {
-                if (readLength == 0)
-                    return -1;
-                else {
-                    _chunkLength = END_OF_DATA;
-                    return readLength;
-                }
-            } else {
-                int tag = read();
-
-                switch (tag) {
-                    case 'B':
-                    case 'b':
-                        _isLastChunk = tag == 'B';
-                        _chunkLength = (read() << 8) + read();
-                        break;
-
-                    default:
-                        throw new IOException("expected 'B' at " + (char) tag);
-                }
-            }
-        }
-
-        if (readLength == 0)
-            return -1;
-        else if (_chunkLength > 0 || !_isLastChunk)
-            return readLength;
-        else {
-            _chunkLength = END_OF_DATA;
-            return readLength;
-        }
-    }
-
-    /**
-     * Reads a fault.
-     */
-    private HashMap readFault()
-            throws IOException {
-        HashMap map = new HashMap();
-
-        int code = read();
-        for (; code > 0 && code != 'z'; code = read()) {
-            _peek = code;
-
-            Object key = readObject();
-            Object value = readObject();
-
-            if (key != null && value != null)
-                map.put(key, value);
-        }
-
-        if (code != 'z')
-            throw expect("fault", code);
-
-        return map;
-    }
-
-    /**
-     * Reads an object from the input stream with an expected type.
-     */
-    @Override
-    public Object readObject(Class cl)
-            throws IOException {
-        return readObject(cl, null, null);
-    }
-
-    /**
-     * Reads an object from the input stream with an expected type.
-     */
-    public Object readObject(Class expectedClass, Class<?>... expectedTypes)
-            throws IOException {
-        if (expectedClass == null || expectedClass == Object.class)
-            return readObject();
-
-        int tag = read();
-
-        switch (tag) {
-            case 'N':
-                return null;
-
-            case 'M': {
-                String type = readType();
-
-                boolean keyValuePair = expectedTypes != null && expectedTypes.length == 2;
-
-                // hessian/3386
-                if ("".equals(type)) {
-                    Deserializer reader;
-                    reader = _serializerFactory.getDeserializer(expectedClass);
-
-                    return reader.readMap(this
-                            , keyValuePair ? expectedTypes[0] : null
-                            , keyValuePair ? expectedTypes[1] : null);
-                } else {
-                    Deserializer reader;
-                    reader = _serializerFactory.getObjectDeserializer(type, expectedClass);
-
-                    return reader.readMap(this
-                            , keyValuePair ? expectedTypes[0] : null
-                            , keyValuePair ? expectedTypes[1] : null);
-                }
-            }
-
-            case 'V': {
-                String type = readType();
-                int length = readLength();
-
-                Deserializer reader;
-                reader = _serializerFactory.getObjectDeserializer(type);
-
-                boolean valueType = expectedTypes != null && expectedTypes.length == 1;
-
-                if (expectedClass != reader.getType() && expectedClass.isAssignableFrom(reader.getType()))
-                    return reader.readList(this, length, valueType ? expectedTypes[0] : null);
-
-                reader = _serializerFactory.getDeserializer(expectedClass);
-
-                Object v = reader.readList(this, length, valueType ? expectedTypes[0] : null);
-
-                return v;
-            }
-
-            case 'R': {
-                int ref = parseInt();
-
-                return _refs.get(ref);
-            }
-
-            case 'r': {
-                String type = readType();
-                String url = readString();
-
-                return resolveRemote(type, url);
-            }
-        }
-
-        _peek = tag;
-
-        // hessian/332i vs hessian/3406
-        //return readObject();
-
-        Object value = _serializerFactory.getDeserializer(expectedClass).readObject(this);
-
-        return value;
-    }
-
-    /**
-     * Reads an arbitrary object from the input stream when the type
-     * is unknown.
-     */
-    @Override
-    public Object readObject()
-            throws IOException {
-        return readObject((List<Class<?>>) null);
-    }
-
-    /**
-     * Reads an arbitrary object from the input stream when the type
-     * is unknown.
-     */
-    public Object readObject(List<Class<?>> expectedTypes)
-            throws IOException {
-        int tag = read();
-
-        switch (tag) {
-            case 'N':
-                return null;
-
-            case 'T':
-                return Boolean.valueOf(true);
-
-            case 'F':
-                return Boolean.valueOf(false);
-
-            case 'I':
-                return Integer.valueOf(parseInt());
-
-            case 'L':
-                return Long.valueOf(parseLong());
-
-            case 'D':
-                return Double.valueOf(parseDouble());
-
-            case 'd':
-                return new Date(parseLong());
-
-            case 'x':
-            case 'X': {
-                _isLastChunk = tag == 'X';
-                _chunkLength = (read() << 8) + read();
-
-                return parseXML();
-            }
-
-            case 's':
-            case 'S': {
-                _isLastChunk = tag == 'S';
-                _chunkLength = (read() << 8) + read();
-
-                int data;
-                _sbuf.setLength(0);
-
-                while ((data = parseChar()) >= 0)
-                    _sbuf.append((char) data);
-
-                return _sbuf.toString();
-            }
-
-            case 'b':
-            case 'B': {
-                _isLastChunk = tag == 'B';
-                _chunkLength = (read() << 8) + read();
-
-                int data;
-                ByteArrayOutputStream bos = new ByteArrayOutputStream();
-
-                while ((data = parseByte()) >= 0)
-                    bos.write(data);
-
-                return bos.toByteArray();
-            }
-
-            case 'V': {
-                String type = readType();
-                int length = readLength();
-
-                Deserializer reader;
-                reader = _serializerFactory.getObjectDeserializer(type);
-
-                boolean valueType = expectedTypes != null && expectedTypes.size() == 1;
-
-                if (List.class != reader.getType() && List.class.isAssignableFrom(reader.getType()))
-                    return reader.readList(this, length, valueType ? expectedTypes.get(0) : null);
-
-                reader = _serializerFactory.getDeserializer(List.class);
-
-                Object v = reader.readList(this, length, valueType ? expectedTypes.get(0) : null);
-
-                return v;
-            }
-
-            case 'M': {
-                String type = readType();
-
-                boolean keyValuePair = expectedTypes != null && expectedTypes.size() == 2;
-
-                return _serializerFactory.readMap(this, type
-                        , keyValuePair ? expectedTypes.get(0) : null
-                        , keyValuePair ? expectedTypes.get(1) : null);
-            }
-
-            case 'R': {
-                int ref = parseInt();
-
-                return _refs.get(ref);
-            }
-
-            case 'r': {
-                String type = readType();
-                String url = readString();
-
-                return resolveRemote(type, url);
-            }
-
-            default:
-                throw error("unknown code for readObject at " + codeName(tag));
-        }
-    }
-
-    /**
-     * Reads a remote object.
-     */
-    @Override
-    public Object readRemote()
-            throws IOException {
-        String type = readType();
-        String url = readString();
-
-        return resolveRemote(type, url);
-    }
-
-    /**
-     * Reads a reference.
-     */
-    @Override
-    public Object readRef()
-            throws IOException {
-        return _refs.get(parseInt());
-    }
-
-    /**
-     * Reads the start of a list.
-     */
-    @Override
-    public int readListStart()
-            throws IOException {
-        return read();
-    }
-
-    /**
-     * Reads the start of a list.
-     */
-    @Override
-    public int readMapStart()
-            throws IOException {
-        return read();
-    }
-
-    /**
-     * Returns true if this is the end of a list or a map.
-     */
-    @Override
-    public boolean isEnd()
-            throws IOException {
-        int code = read();
-
-        _peek = code;
-
-        return (code < 0 || code == 'z');
-    }
-
-    /**
-     * Reads the end byte.
-     */
-    @Override
-    public void readEnd()
-            throws IOException {
-        int code = read();
-
-        if (code != 'z')
-            throw error("unknown code at " + codeName(code));
-    }
-
-    /**
-     * Reads the end byte.
-     */
-    @Override
-    public void readMapEnd()
-            throws IOException {
-        int code = read();
-
-        if (code != 'z')
-            throw error("expected end of map ('z') at " + codeName(code));
-    }
-
-    /**
-     * Reads the end byte.
-     */
-    @Override
-    public void readListEnd()
-            throws IOException {
-        int code = read();
-
-        if (code != 'z')
-            throw error("expected end of list ('z') at " + codeName(code));
-    }
-
-    /**
-     * Adds a list/map reference.
-     */
-    @Override
-    public int addRef(Object ref) {
-        if (_refs == null)
-            _refs = new ArrayList();
-
-        _refs.add(ref);
-
-        return _refs.size() - 1;
-    }
-
-    /**
-     * Adds a list/map reference.
-     */
-    @Override
-    public void setRef(int i, Object ref) {
-        _refs.set(i, ref);
-    }
-
-    /**
-     * Resets the references for streaming.
-     */
-    @Override
-    public void resetReferences() {
-        if (_refs != null)
-            _refs.clear();
-    }
-
-    /**
-     * Resolves a remote object.
-     */
-    public Object resolveRemote(String type, String url)
-            throws IOException {
-        HessianRemoteResolver resolver = getRemoteResolver();
-
-        if (resolver != null)
-            return resolver.lookup(type, url);
-        else
-            return new HessianRemote(type, url);
-    }
-
-    /**
-     * Parses a type from the stream.
-     * <p>
-     * <pre>
-     * t b16 b8
-     * </pre>
-     */
-    @Override
-    public String readType()
-            throws IOException {
-        int code = read();
-
-        if (code != 't') {
-            _peek = code;
-            return "";
-        }
-
-        _isLastChunk = true;
-        _chunkLength = (read() << 8) + read();
-
-        _sbuf.setLength(0);
-        int ch;
-        while ((ch = parseChar()) >= 0)
-            _sbuf.append((char) ch);
-
-        return _sbuf.toString();
-    }
-
-    /**
-     * Parses the length for an array
-     * <p>
-     * <pre>
-     * l b32 b24 b16 b8
-     * </pre>
-     */
-    @Override
-    public int readLength()
-            throws IOException {
-        int code = read();
-
-        if (code != 'l') {
-            _peek = code;
-            return -1;
-        }
-
-        return parseInt();
-    }
-
-    /**
-     * Parses a 32-bit integer value from the stream.
-     * <p>
-     * <pre>
-     * b32 b24 b16 b8
-     * </pre>
-     */
-    private int parseInt()
-            throws IOException {
-        int b32 = read();
-        int b24 = read();
-        int b16 = read();
-        int b8 = read();
-
-        return (b32 << 24) + (b24 << 16) + (b16 << 8) + b8;
-    }
-
-    /**
-     * Parses a 64-bit long value from the stream.
-     * <p>
-     * <pre>
-     * b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre>
-     */
-    private long parseLong()
-            throws IOException {
-        long b64 = read();
-        long b56 = read();
-        long b48 = read();
-        long b40 = read();
-        long b32 = read();
-        long b24 = read();
-        long b16 = read();
-        long b8 = read();
-
-        return ((b64 << 56) +
-                (b56 << 48) +
-                (b48 << 40) +
-                (b40 << 32) +
-                (b32 << 24) +
-                (b24 << 16) +
-                (b16 << 8) +
-                b8);
-    }
-
-    /**
-     * Parses a 64-bit double value from the stream.
-     * <p>
-     * <pre>
-     * b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre>
-     */
-    private double parseDouble()
-            throws IOException {
-        long b64 = read();
-        long b56 = read();
-        long b48 = read();
-        long b40 = read();
-        long b32 = read();
-        long b24 = read();
-        long b16 = read();
-        long b8 = read();
-
-        long bits = ((b64 << 56) +
-                (b56 << 48) +
-                (b48 << 40) +
-                (b40 << 32) +
-                (b32 << 24) +
-                (b24 << 16) +
-                (b16 << 8) +
-                b8);
-
-        return Double.longBitsToDouble(bits);
-    }
-
-    org.w3c.dom.Node parseXML()
-            throws IOException {
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * Reads a character from the underlying stream.
-     */
-    private int parseChar()
-            throws IOException {
-        while (_chunkLength <= 0) {
-            if (_isLastChunk)
-                return -1;
-
-            int code = read();
-
-            switch (code) {
-                case 's':
-                case 'x':
-                    _isLastChunk = false;
-
-                    _chunkLength = (read() << 8) + read();
-                    break;
-
-                case 'S':
-                case 'X':
-                    _isLastChunk = true;
-
-                    _chunkLength = (read() << 8) + read();
-                    break;
-
-                default:
-                    throw expect("string", code);
-            }
-
-        }
-
-        _chunkLength--;
-
-        return parseUTF8Char();
-    }
-
-    /**
-     * Parses a single UTF8 character.
-     */
-    private int parseUTF8Char()
-            throws IOException {
-        int ch = read();
-
-        if (ch < 0x80)
-            return ch;
-        else if ((ch & 0xe0) == 0xc0) {
-            int ch1 = read();
-            int v = ((ch & 0x1f) << 6) + (ch1 & 0x3f);
-
-            return v;
-        } else if ((ch & 0xf0) == 0xe0) {
-            int ch1 = read();
-            int ch2 = read();
-            int v = ((ch & 0x0f) << 12) + ((ch1 & 0x3f) << 6) + (ch2 & 0x3f);
-
-            return v;
-        } else
-            throw error("bad utf-8 encoding at " + codeName(ch));
-    }
-
-    /**
-     * Reads a byte from the underlying stream.
-     */
-    private int parseByte()
-            throws IOException {
-        while (_chunkLength <= 0) {
-            if (_isLastChunk) {
-                return -1;
-            }
-
-            int code = read();
-
-            switch (code) {
-                case 'b':
-                    _isLastChunk = false;
-
-                    _chunkLength = (read() << 8) + read();
-                    break;
-
-                case 'B':
-                    _isLastChunk = true;
-
-                    _chunkLength = (read() << 8) + read();
-                    break;
-
-                default:
-                    throw expect("byte[]", code);
-            }
-        }
-
-        _chunkLength--;
-
-        return read();
-    }
-
-    /**
-     * Reads bytes based on an input stream.
-     */
-    @Override
-    public InputStream readInputStream()
-            throws IOException {
-        int tag = read();
-
-        switch (tag) {
-            case 'N':
-                return null;
-
-            case 'B':
-            case 'b':
-                _isLastChunk = tag == 'B';
-                _chunkLength = (read() << 8) + read();
-                break;
-
-            default:
-                throw expect("inputStream", tag);
-        }
-
-        return new InputStream() {
-            boolean _isClosed = false;
-
-            @Override
-            public int read()
-                    throws IOException {
-                if (_isClosed || _is == null)
-                    return -1;
-
-                int ch = parseByte();
-                if (ch < 0)
-                    _isClosed = true;
-
-                return ch;
-            }
-
-            @Override
-            public int read(byte[] buffer, int offset, int length)
-                    throws IOException {
-                if (_isClosed || _is == null)
-                    return -1;
-
-                int len = HessianInput.this.read(buffer, offset, length);
-                if (len < 0)
-                    _isClosed = true;
-
-                return len;
-            }
-
-            @Override
-            public void close()
-                    throws IOException {
-                while (read() >= 0) {
-                }
-
-                _isClosed = true;
-            }
-        };
-    }
-
-    /**
-     * Reads bytes from the underlying stream.
-     */
-    int read(byte[] buffer, int offset, int length)
-            throws IOException {
-        int readLength = 0;
-
-        while (length > 0) {
-            while (_chunkLength <= 0) {
-                if (_isLastChunk)
-                    return readLength == 0 ? -1 : readLength;
-
-                int code = read();
-
-                switch (code) {
-                    case 'b':
-                        _isLastChunk = false;
-
-                        _chunkLength = (read() << 8) + read();
-                        break;
-
-                    case 'B':
-                        _isLastChunk = true;
-
-                        _chunkLength = (read() << 8) + read();
-                        break;
-
-                    default:
-                        throw expect("byte[]", code);
-                }
-            }
-
-            int sublen = _chunkLength;
-            if (length < sublen)
-                sublen = length;
-
-            sublen = _is.read(buffer, offset, sublen);
-            offset += sublen;
-            readLength += sublen;
-            length -= sublen;
-            _chunkLength -= sublen;
-        }
-
-        return readLength;
-    }
-
-    final int read()
-            throws IOException {
-        if (_peek >= 0) {
-            int value = _peek;
-            _peek = -1;
-            return value;
-        }
-
-        int ch = _is.read();
-
-        return ch;
-    }
-
-    @Override
-    public void close() {
-        _is = null;
-    }
-
-    @Override
-    public Reader getReader() {
-        return null;
-    }
-
-    protected IOException expect(String expect, int ch) {
-        return error("expected " + expect + " at " + codeName(ch));
-    }
-
-    protected String codeName(int ch) {
-        if (ch < 0)
-            return "end of file";
-        else
-            return "0x" + Integer.toHexString(ch & 0xff) + " (" + (char) +ch + ")";
-    }
-
-    protected IOException error(String message) {
-        if (_method != null)
-            return new HessianProtocolException(_method + ": " + message);
-        else
-            return new HessianProtocolException(message);
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianInputFactory.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianInputFactory.java
deleted file mode 100644
index 2c0cf697d6..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianInputFactory.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.logging.Logger;
-
-public class HessianInputFactory {
-    public static final Logger log
-            = Logger.getLogger(HessianInputFactory.class.getName());
-
-    private SerializerFactory _serializerFactory;
-
-    public SerializerFactory getSerializerFactory() {
-        return _serializerFactory;
-    }
-
-    public void setSerializerFactory(SerializerFactory factory) {
-        _serializerFactory = factory;
-    }
-
-    public AbstractHessianInput open(InputStream is)
-            throws IOException {
-        int code = is.read();
-
-        int major = is.read();
-        int minor = is.read();
-
-        switch (code) {
-            case 'c':
-            case 'C':
-            case 'r':
-            case 'R':
-                if (major >= 2) {
-                    AbstractHessianInput in = new Hessian2Input(is);
-                    in.setSerializerFactory(_serializerFactory);
-                    return in;
-                } else {
-                    AbstractHessianInput in = new HessianInput(is);
-                    in.setSerializerFactory(_serializerFactory);
-                    return in;
-                }
-
-            default:
-                throw new IOException((char) code + " is an unknown Hessian message code.");
-        }
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianOutput.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianOutput.java
deleted file mode 100644
index aad614b98e..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianOutput.java
+++ /dev/null
@@ -1,931 +0,0 @@
-/*
- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.IdentityHashMap;
-
-/**
- * Output stream for Hessian requests, compatible with microedition
- * Java.  It only uses classes and types available in JDK.
- * <p>
- * <p>Since HessianOutput does not depend on any classes other than
- * in the JDK, it can be extracted independently into a smaller package.
- * <p>
- * <p>HessianOutput is unbuffered, so any client needs to provide
- * its own buffering.
- * <p>
- * <pre>
- * OutputStream os = ...; // from http connection
- * HessianOutput out = new HessianOutput(os);
- * String value;
- *
- * out.startCall("hello");  // start hello call
- * out.writeString("arg1"); // write a string argument
- * out.completeCall();      // complete the call
- * </pre>
- */
-public class HessianOutput extends AbstractHessianOutput {
-    // the output stream/
-    protected OutputStream os;
-    // map of references
-    private IdentityHashMap _refs;
-    private int _version = 1;
-
-    /**
-     * Creates a new Hessian output stream, initialized with an
-     * underlying output stream.
-     *
-     * @param os the underlying output stream.
-     */
-    public HessianOutput(OutputStream os) {
-        init(os);
-    }
-
-    /**
-     * Creates an uninitialized Hessian output stream.
-     */
-    public HessianOutput() {
-    }
-
-    /**
-     * Initializes the output
-     */
-    @Override
-    public void init(OutputStream os) {
-        this.os = os;
-
-        _refs = null;
-
-        if (_serializerFactory == null)
-            _serializerFactory = new SerializerFactory();
-    }
-
-    /**
-     * Sets the client's version.
-     */
-    public void setVersion(int version) {
-        _version = version;
-    }
-
-    /**
-     * Writes a complete method call.
-     */
-    @Override
-    public void call(String method, Object[] args)
-            throws IOException {
-        int length = args != null ? args.length : 0;
-
-        startCall(method, length);
-
-        for (int i = 0; i < length; i++)
-            writeObject(args[i]);
-
-        completeCall();
-    }
-
-    /**
-     * Starts the method call.  Clients would use <code>startCall</code>
-     * instead of <code>call</code> if they wanted finer control over
-     * writing the arguments, or needed to write headers.
-     * <p>
-     * <code><pre>
-     * c major minor
-     * m b16 b8 method-name
-     * </pre></code>
-     *
-     * @param method the method name to call.
-     */
-    @Override
-    public void startCall(String method, int length)
-            throws IOException {
-        os.write('c');
-        os.write(_version);
-        os.write(0);
-
-        os.write('m');
-        int len = method.length();
-        os.write(len >> 8);
-        os.write(len);
-        printString(method, 0, len);
-    }
-
-    /**
-     * Writes the call tag.  This would be followed by the
-     * headers and the method tag.
-     * <p>
-     * <code><pre>
-     * c major minor
-     * </pre></code>
-     *
-     * @param method the method name to call.
-     */
-    @Override
-    public void startCall()
-            throws IOException {
-        os.write('c');
-        os.write(0);
-        os.write(1);
-    }
-
-    /**
-     * Writes the method tag.
-     * <p>
-     * <code><pre>
-     * m b16 b8 method-name
-     * </pre></code>
-     *
-     * @param method the method name to call.
-     */
-    @Override
-    public void writeMethod(String method)
-            throws IOException {
-        os.write('m');
-        int len = method.length();
-        os.write(len >> 8);
-        os.write(len);
-        printString(method, 0, len);
-    }
-
-    /**
-     * Completes.
-     * <p>
-     * <code><pre>
-     * z
-     * </pre></code>
-     */
-    @Override
-    public void completeCall()
-            throws IOException {
-        os.write('z');
-    }
-
-    /**
-     * Starts the reply
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * r
-     * </pre>
-     */
-    @Override
-    public void startReply()
-            throws IOException {
-        os.write('r');
-        os.write(1);
-        os.write(0);
-    }
-
-    /**
-     * Completes reading the reply
-     * <p>
-     * <p>A successful completion will have a single value:
-     * <p>
-     * <pre>
-     * z
-     * </pre>
-     */
-    @Override
-    public void completeReply()
-            throws IOException {
-        os.write('z');
-    }
-
-    /**
-     * Writes a header name.  The header value must immediately follow.
-     * <p>
-     * <code><pre>
-     * H b16 b8 foo <em>value</em>
-     * </pre></code>
-     */
-    @Override
-    public void writeHeader(String name)
-            throws IOException {
-        int len = name.length();
-
-        os.write('H');
-        os.write(len >> 8);
-        os.write(len);
-
-        printString(name);
-    }
-
-    /**
-     * Writes a fault.  The fault will be written
-     * as a descriptive string followed by an object:
-     * <p>
-     * <code><pre>
-     * f
-     * &lt;string>code
-     * &lt;string>the fault code
-     * <p>
-     * &lt;string>message
-     * &lt;string>the fault mesage
-     * <p>
-     * &lt;string>detail
-     * mt\x00\xnnjavax.ejb.FinderException
-     *     ...
-     * z
-     * z
-     * </pre></code>
-     *
-     * @param code the fault code, a three digit
-     */
-    @Override
-    public void writeFault(String code, String message, Object detail)
-            throws IOException {
-        os.write('f');
-        writeString("code");
-        writeString(code);
-
-        writeString("message");
-        writeString(message);
-
-        if (detail != null) {
-            writeString("detail");
-            writeObject(detail);
-        }
-        os.write('z');
-    }
-
-    /**
-     * Writes any object to the output stream.
-     */
-    @Override
-    public void writeObject(Object object)
-            throws IOException {
-        if (object == null) {
-            writeNull();
-            return;
-        }
-
-        Serializer serializer;
-
-        serializer = _serializerFactory.getSerializer(object.getClass());
-
-        serializer.writeObject(object, this);
-    }
-
-    /**
-     * Writes the list header to the stream.  List writers will call
-     * <code>writeListBegin</code> followed by the list contents and then
-     * call <code>writeListEnd</code>.
-     * <p>
-     * <code><pre>
-     * V
-     * t b16 b8 type
-     * l b32 b24 b16 b8
-     * </pre></code>
-     */
-    @Override
-    public boolean writeListBegin(int length, String type)
-            throws IOException {
-        os.write('V');
-
-        if (type != null) {
-            os.write('t');
-            printLenString(type);
-        }
-
-        if (length >= 0) {
-            os.write('l');
-            os.write(length >> 24);
-            os.write(length >> 16);
-            os.write(length >> 8);
-            os.write(length);
-        }
-
-        return true;
-    }
-
-    /**
-     * Writes the tail of the list to the stream.
-     */
-    @Override
-    public void writeListEnd()
-            throws IOException {
-        os.write('z');
-    }
-
-    /**
-     * Writes the map header to the stream.  Map writers will call
-     * <code>writeMapBegin</code> followed by the map contents and then
-     * call <code>writeMapEnd</code>.
-     * <p>
-     * <code><pre>
-     * Mt b16 b8 (<key> <value>)z
-     * </pre></code>
-     */
-    @Override
-    public void writeMapBegin(String type)
-            throws IOException {
-        os.write('M');
-        os.write('t');
-        printLenString(type);
-    }
-
-    /**
-     * Writes the tail of the map to the stream.
-     */
-    @Override
-    public void writeMapEnd()
-            throws IOException {
-        os.write('z');
-    }
-
-    /**
-     * Writes a remote object reference to the stream.  The type is the
-     * type of the remote interface.
-     * <p>
-     * <code><pre>
-     * 'r' 't' b16 b8 type url
-     * </pre></code>
-     */
-    public void writeRemote(String type, String url)
-            throws IOException {
-        os.write('r');
-        os.write('t');
-        printLenString(type);
-        os.write('S');
-        printLenString(url);
-    }
-
-    /**
-     * Writes a boolean value to the stream.  The boolean will be written
-     * with the following syntax:
-     * <p>
-     * <code><pre>
-     * T
-     * F
-     * </pre></code>
-     *
-     * @param value the boolean value to write.
-     */
-    @Override
-    public void writeBoolean(boolean value)
-            throws IOException {
-        if (value)
-            os.write('T');
-        else
-            os.write('F');
-    }
-
-    /**
-     * Writes an integer value to the stream.  The integer will be written
-     * with the following syntax:
-     * <p>
-     * <code><pre>
-     * I b32 b24 b16 b8
-     * </pre></code>
-     *
-     * @param value the integer value to write.
-     */
-    @Override
-    public void writeInt(int value)
-            throws IOException {
-        os.write('I');
-        os.write(value >> 24);
-        os.write(value >> 16);
-        os.write(value >> 8);
-        os.write(value);
-    }
-
-    /**
-     * Writes a long value to the stream.  The long will be written
-     * with the following syntax:
-     * <p>
-     * <code><pre>
-     * L b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre></code>
-     *
-     * @param value the long value to write.
-     */
-    @Override
-    public void writeLong(long value)
-            throws IOException {
-        os.write('L');
-        os.write((byte) (value >> 56));
-        os.write((byte) (value >> 48));
-        os.write((byte) (value >> 40));
-        os.write((byte) (value >> 32));
-        os.write((byte) (value >> 24));
-        os.write((byte) (value >> 16));
-        os.write((byte) (value >> 8));
-        os.write((byte) (value));
-    }
-
-    /**
-     * Writes a double value to the stream.  The double will be written
-     * with the following syntax:
-     * <p>
-     * <code><pre>
-     * D b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre></code>
-     *
-     * @param value the double value to write.
-     */
-    @Override
-    public void writeDouble(double value)
-            throws IOException {
-        long bits = Double.doubleToLongBits(value);
-
-        os.write('D');
-        os.write((byte) (bits >> 56));
-        os.write((byte) (bits >> 48));
-        os.write((byte) (bits >> 40));
-        os.write((byte) (bits >> 32));
-        os.write((byte) (bits >> 24));
-        os.write((byte) (bits >> 16));
-        os.write((byte) (bits >> 8));
-        os.write((byte) (bits));
-    }
-
-    /**
-     * Writes a date to the stream.
-     * <p>
-     * <code><pre>
-     * T  b64 b56 b48 b40 b32 b24 b16 b8
-     * </pre></code>
-     *
-     * @param time the date in milliseconds from the epoch in UTC
-     */
-    @Override
-    public void writeUTCDate(long time)
-            throws IOException {
-        os.write('d');
-        os.write((byte) (time >> 56));
-        os.write((byte) (time >> 48));
-        os.write((byte) (time >> 40));
-        os.write((byte) (time >> 32));
-        os.write((byte) (time >> 24));
-        os.write((byte) (time >> 16));
-        os.write((byte) (time >> 8));
-        os.write((byte) (time));
-    }
-
-    /**
-     * Writes a null value to the stream.
-     * The null will be written with the following syntax
-     * <p>
-     * <code><pre>
-     * N
-     * </pre></code>
-     *
-     * @param value the string value to write.
-     */
-    @Override
-    public void writeNull()
-            throws IOException {
-        os.write('N');
-    }
-
-    /**
-     * Writes a string value to the stream using UTF-8 encoding.
-     * The string will be written with the following syntax:
-     * <p>
-     * <code><pre>
-     * S b16 b8 string-value
-     * </pre></code>
-     * <p>
-     * If the value is null, it will be written as
-     * <p>
-     * <code><pre>
-     * N
-     * </pre></code>
-     *
-     * @param value the string value to write.
-     */
-    @Override
-    public void writeString(String value)
-            throws IOException {
-        if (value == null) {
-            os.write('N');
-        } else {
-            int length = value.length();
-            int offset = 0;
-
-            while (length > 0x8000) {
-                int sublen = 0x8000;
-
-                // chunk can't end in high surrogate
-                char tail = value.charAt(offset + sublen - 1);
-
-                if (0xd800 <= tail && tail <= 0xdbff)
-                    sublen--;
-
-                os.write('s');
-                os.write(sublen >> 8);
-                os.write(sublen);
-
-                printString(value, offset, sublen);
-
-                length -= sublen;
-                offset += sublen;
-            }
-
-            os.write('S');
-            os.write(length >> 8);
-            os.write(length);
-
-            printString(value, offset, length);
-        }
-    }
-
-    /**
-     * Writes a string value to the stream using UTF-8 encoding.
-     * The string will be written with the following syntax:
-     * <p>
-     * <code><pre>
-     * S b16 b8 string-value
-     * </pre></code>
-     * <p>
-     * If the value is null, it will be written as
-     * <p>
-     * <code><pre>
-     * N
-     * </pre></code>
-     *
-     * @param value the string value to write.
-     */
-    @Override
-    public void writeString(char[] buffer, int offset, int length)
-            throws IOException {
-        if (buffer == null) {
-            os.write('N');
-        } else {
-            while (length > 0x8000) {
-                int sublen = 0x8000;
-
-                // chunk can't end in high surrogate
-                char tail = buffer[offset + sublen - 1];
-
-                if (0xd800 <= tail && tail <= 0xdbff)
-                    sublen--;
-
-                os.write('s');
-                os.write(sublen >> 8);
-                os.write(sublen);
-
-                printString(buffer, offset, sublen);
-
-                length -= sublen;
-                offset += sublen;
-            }
-
-            os.write('S');
-            os.write(length >> 8);
-            os.write(length);
-
-            printString(buffer, offset, length);
-        }
-    }
-
-    /**
-     * Writes a byte array to the stream.
-     * The array will be written with the following syntax:
-     * <p>
-     * <code><pre>
-     * B b16 b18 bytes
-     * </pre></code>
-     * <p>
-     * If the value is null, it will be written as
-     * <p>
-     * <code><pre>
-     * N
-     * </pre></code>
-     *
-     * @param value the string value to write.
-     */
-    @Override
-    public void writeBytes(byte[] buffer)
-            throws IOException {
-        if (buffer == null)
-            os.write('N');
-        else
-            writeBytes(buffer, 0, buffer.length);
-    }
-
-    /**
-     * Writes a byte array to the stream.
-     * The array will be written with the following syntax:
-     * <p>
-     * <code><pre>
-     * B b16 b18 bytes
-     * </pre></code>
-     * <p>
-     * If the value is null, it will be written as
-     * <p>
-     * <code><pre>
-     * N
-     * </pre></code>
-     *
-     * @param value the string value to write.
-     */
-    @Override
-    public void writeBytes(byte[] buffer, int offset, int length)
-            throws IOException {
-        if (buffer == null) {
-            os.write('N');
-        } else {
-            while (length > 0x8000) {
-                int sublen = 0x8000;
-
-                os.write('b');
-                os.write(sublen >> 8);
-                os.write(sublen);
-
-                os.write(buffer, offset, sublen);
-
-                length -= sublen;
-                offset += sublen;
-            }
-
-            os.write('B');
-            os.write(length >> 8);
-            os.write(length);
-            os.write(buffer, offset, length);
-        }
-    }
-
-    /**
-     * Writes a byte buffer to the stream.
-     * <p>
-     * <code><pre>
-     * </pre></code>
-     */
-    @Override
-    public void writeByteBufferStart()
-            throws IOException {
-    }
-
-    /**
-     * Writes a byte buffer to the stream.
-     * <p>
-     * <code><pre>
-     * b b16 b18 bytes
-     * </pre></code>
-     */
-    @Override
-    public void writeByteBufferPart(byte[] buffer, int offset, int length)
-            throws IOException {
-        while (length > 0) {
-            int sublen = length;
-
-            if (0x8000 < sublen)
-                sublen = 0x8000;
-
-            os.write('b');
-            os.write(sublen >> 8);
-            os.write(sublen);
-
-            os.write(buffer, offset, sublen);
-
-            length -= sublen;
-            offset += sublen;
-        }
-    }
-
-    /**
-     * Writes a byte buffer to the stream.
-     * <p>
-     * <code><pre>
-     * b b16 b18 bytes
-     * </pre></code>
-     */
-    @Override
-    public void writeByteBufferEnd(byte[] buffer, int offset, int length)
-            throws IOException {
-        writeBytes(buffer, offset, length);
-    }
-
-    /**
-     * Writes a reference.
-     * <p>
-     * <code><pre>
-     * R b32 b24 b16 b8
-     * </pre></code>
-     *
-     * @param value the integer value to write.
-     */
-    @Override
-    public void writeRef(int value)
-            throws IOException {
-        os.write('R');
-        os.write(value >> 24);
-        os.write(value >> 16);
-        os.write(value >> 8);
-        os.write(value);
-    }
-
-    /**
-     * Writes a placeholder.
-     * <p>
-     * <code><pre>
-     * P
-     * </pre></code>
-     */
-    public void writePlaceholder()
-            throws IOException {
-        os.write('P');
-    }
-
-    /**
-     * If the object has already been written, just write its ref.
-     *
-     * @return true if we're writing a ref.
-     */
-    @Override
-    public boolean addRef(Object object)
-            throws IOException {
-        if (_refs == null)
-            _refs = new IdentityHashMap();
-
-        Integer ref = (Integer) _refs.get(object);
-
-        if (ref != null) {
-            int value = ref.intValue();
-
-            writeRef(value);
-            return true;
-        } else {
-            _refs.put(object, new Integer(_refs.size()));
-
-            return false;
-        }
-    }
-
-    /**
-     * Resets the references for streaming.
-     */
-    @Override
-    public void resetReferences() {
-        if (_refs != null)
-            _refs.clear();
-    }
-
-    /**
-     * Removes a reference.
-     */
-    @Override
-    public boolean removeRef(Object obj)
-            throws IOException {
-        if (_refs != null) {
-            _refs.remove(obj);
-
-            return true;
-        } else
-            return false;
-    }
-
-    /**
-     * Replaces a reference from one object to another.
-     */
-    @Override
-    public boolean replaceRef(Object oldRef, Object newRef)
-            throws IOException {
-        Integer value = (Integer) _refs.remove(oldRef);
-
-        if (value != null) {
-            _refs.put(newRef, value);
-            return true;
-        } else
-            return false;
-    }
-
-    /**
-     * Prints a string to the stream, encoded as UTF-8 with preceeding length
-     *
-     * @param v the string to print.
-     */
-    public void printLenString(String v)
-            throws IOException {
-        if (v == null) {
-            os.write(0);
-            os.write(0);
-        } else {
-            int len = v.length();
-            os.write(len >> 8);
-            os.write(len);
-
-            printString(v, 0, len);
-        }
-    }
-
-    /**
-     * Prints a string to the stream, encoded as UTF-8
-     *
-     * @param v the string to print.
-     */
-    public void printString(String v)
-            throws IOException {
-        printString(v, 0, v.length());
-    }
-
-    /**
-     * Prints a string to the stream, encoded as UTF-8
-     *
-     * @param v the string to print.
-     */
-    public void printString(String v, int offset, int length)
-            throws IOException {
-        for (int i = 0; i < length; i++) {
-            char ch = v.charAt(i + offset);
-
-            if (ch < 0x80)
-                os.write(ch);
-            else if (ch < 0x800) {
-                os.write(0xc0 + ((ch >> 6) & 0x1f));
-                os.write(0x80 + (ch & 0x3f));
-            } else {
-                os.write(0xe0 + ((ch >> 12) & 0xf));
-                os.write(0x80 + ((ch >> 6) & 0x3f));
-                os.write(0x80 + (ch & 0x3f));
-            }
-        }
-    }
-
-    /**
-     * Prints a string to the stream, encoded as UTF-8
-     *
-     * @param v the string to print.
-     */
-    public void printString(char[] v, int offset, int length)
-            throws IOException {
-        for (int i = 0; i < length; i++) {
-            char ch = v[i + offset];
-
-            if (ch < 0x80)
-                os.write(ch);
-            else if (ch < 0x800) {
-                os.write(0xc0 + ((ch >> 6) & 0x1f));
-                os.write(0x80 + (ch & 0x3f));
-            } else {
-                os.write(0xe0 + ((ch >> 12) & 0xf));
-                os.write(0x80 + ((ch >> 6) & 0x3f));
-                os.write(0x80 + (ch & 0x3f));
-            }
-        }
-    }
-
-    @Override
-    public void flush()
-            throws IOException {
-        if (this.os != null)
-            this.os.flush();
-    }
-
-    @Override
-    public void close()
-            throws IOException {
-        if (this.os != null)
-            this.os.flush();
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianProtocolException.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianProtocolException.java
deleted file mode 100644
index 28aa320a92..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianProtocolException.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-
-/**
- * Exception for faults when the fault doesn't return a java exception.
- * This exception is required for MicroHessianInput.
- */
-public class HessianProtocolException extends IOException {
-    private Throwable rootCause;
-
-    /**
-     * Zero-arg constructor.
-     */
-    public HessianProtocolException() {
-    }
-
-    /**
-     * Create the exception.
-     */
-    public HessianProtocolException(String message) {
-        super(message);
-    }
-
-    /**
-     * Create the exception.
-     */
-    public HessianProtocolException(String message, Throwable rootCause) {
-        super(message);
-
-        this.rootCause = rootCause;
-    }
-
-    /**
-     * Create the exception.
-     */
-    public HessianProtocolException(Throwable rootCause) {
-        super(String.valueOf(rootCause));
-
-        this.rootCause = rootCause;
-    }
-
-    /**
-     * Returns the underlying cause.
-     */
-    public Throwable getRootCause() {
-        return rootCause;
-    }
-
-    /**
-     * Returns the underlying cause.
-     */
-    @Override
-    public Throwable getCause() {
-        return getRootCause();
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianRemote.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianRemote.java
deleted file mode 100644
index 0f5755e898..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianRemote.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-/**
- * Encapsulates a remote address when no stub is available, e.g. for
- * Java MicroEdition.
- */
-public class HessianRemote {
-    private String type;
-    private String url;
-
-    /**
-     * Creates a new Hessian remote object.
-     *
-     * @param type the remote stub interface
-     * @param url  the remote url
-     */
-    public HessianRemote(String type, String url) {
-        this.type = type;
-        this.url = url;
-    }
-
-    /**
-     * Creates an uninitialized Hessian remote.
-     */
-    public HessianRemote() {
-    }
-
-    /**
-     * Returns the remote api class name.
-     */
-    public String getType() {
-        return type;
-    }
-
-    /**
-     * Returns the remote URL.
-     */
-    public String getURL() {
-        return url;
-    }
-
-    /**
-     * Sets the remote URL.
-     */
-    public void setURL(String url) {
-        this.url = url;
-    }
-
-    /**
-     * Defines the hashcode.
-     */
-    @Override
-    public int hashCode() {
-        return url.hashCode();
-    }
-
-    /**
-     * Defines equality
-     */
-    @Override
-    public boolean equals(Object obj) {
-        if (!(obj instanceof HessianRemote))
-            return false;
-
-        HessianRemote remote = (HessianRemote) obj;
-
-        return url.equals(remote.url);
-    }
-
-    /**
-     * Readable version of the remote.
-     */
-    @Override
-    public String toString() {
-        return "[HessianRemote " + url + "]";
-    }
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianRemoteObject.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianRemoteObject.java
deleted file mode 100644
index 1d5afe5d77..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianRemoteObject.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-/**
- * Interface for any hessian remote object.
- */
-public interface HessianRemoteObject {
-    public String getHessianType();
-
-    public String getHessianURL();
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianRemoteResolver.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianRemoteResolver.java
deleted file mode 100644
index 9f1e325187..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianRemoteResolver.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-
-/**
- * Looks up remote objects.  The default just returns a HessianRemote object.
- */
-public interface HessianRemoteResolver {
-    /**
-     * Looks up a proxy object.
-     */
-    public Object lookup(String type, String url)
-            throws IOException;
-}
diff --git a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianSerializerInput.java b/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianSerializerInput.java
deleted file mode 100644
index ceed54bf9e..0000000000
--- a/hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/HessianSerializerInput.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.
- *
- * The Apache Software License, Version 1.1
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Caucho Technology (http://www.caucho.com/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to
- *    endorse or promote products derived from this software without prior
- *    written permission. For written permission, please contact
- *    info@caucho.com.
- *
- * 5. Products derived from this software may not be called "Resin"
- *    nor may "Resin" appear in their names without prior written
- *    permission of Caucho Technology.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @author Scott Ferguson
- */
-
-package com.alibaba.com.caucho.hessian.io;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.HashMap;

  (This diff was longer than 20,000 lines, and has been truncated...)


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Mime
View raw message