This commit is contained in:
wentch
2015-12-22 16:21:39 +08:00
parent 9662c941cc
commit 5dd83bc747
2 changed files with 35 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ import java.util.Map;
import java.lang.reflect.*;
import java.math.BigInteger;
import java.net.*;
import java.nio.channels.*;
import static org.redkale.convert.ext.InetAddressSimpledCoder.*;
import java.util.*;
import java.util.concurrent.*;
@@ -90,6 +91,7 @@ public abstract class Factory<R extends Reader, W extends Writer> {
this.register(Class.class, TypeSimpledCoder.instance);
this.register(InetSocketAddress.class, InetSocketAddressSimpledCoder.instance);
this.register(Pattern.class, PatternSimpledCoder.instance);
this.register(CompletionHandler.class, CompletionHandlerSimpledCoder.instance);
//---------------------------------------------------------
this.register(boolean[].class, BoolArraySimpledCoder.instance);
this.register(byte[].class, ByteArraySimpledCoder.instance);

View File

@@ -0,0 +1,33 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.redkale.convert.ext;
import java.nio.channels.*;
import org.redkale.convert.*;
/**
*
* @see http://www.redkale.org
* @author zhangjx
* @param <R>
* @param <W>
*/
public class CompletionHandlerSimpledCoder<R extends Reader, W extends Writer> extends SimpledCoder<R, W, CompletionHandler> {
public static final CompletionHandlerSimpledCoder instance = new CompletionHandlerSimpledCoder();
@Override
public void convertTo(W out, CompletionHandler value) {
out.writeNull();
}
@Override
public CompletionHandler convertFrom(R in) {
in.readObjectB();
return null;
}
}