Package com.alibaba.json.test.benchmark.decode

Source Code of com.alibaba.json.test.benchmark.decode.EishayDecode

package com.alibaba.json.test.benchmark.decode;

import com.alibaba.json.test.benchmark.BenchmarkCase;
import com.alibaba.json.test.codec.Codec;

import data.media.MediaContent;

public class EishayDecode extends BenchmarkCase {

    private final String text;

    public EishayDecode(){
        super("EishayDecode");

        this.text = EishayDecodeBytes.instance.getText();
        System.out.println(text);
       
        //JavaBeanMapping.getGlobalInstance().putDeserializer(Image.class, new ImageDeserializer());
        //JavaBeanMapping.getGlobalInstance().putDeserializer(Media.class, new MediaDeserializer());
    }

    @Override
    public void execute(Codec codec) throws Exception {
        MediaContent content = codec.decodeObject(text, MediaContent.class);
        if (content == null) {
            throw new Exception();
        }
    }

}
TOP

Related Classes of com.alibaba.json.test.benchmark.decode.EishayDecode

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.