Examples of OneWayCodec


Examples of org.szegedi.spring.web.jsflow.codec.support.OneWayCodec

        this.compressionLevel = compressionLevel;
    }
   
    public OneWayCodec createDecoder() throws Exception
    {
        return new OneWayCodec()
        {
            private final Inflater inflater = new Inflater();
           
            public byte[] code(byte[] data) throws Exception
            {
View Full Code Here

Examples of org.szegedi.spring.web.jsflow.codec.support.OneWayCodec

        };
    }
   
    public OneWayCodec createEncoder() throws Exception
    {
        return new OneWayCodec()
        {
            private final Deflater deflater = new Deflater(compressionLevel);
           
            public byte[] code(byte[] data) throws Exception
            {
View Full Code Here

Examples of org.szegedi.spring.web.jsflow.codec.support.OneWayCodec

        }
    };
   
    public OneWayCodec createDecoder() throws Exception
    {
        return new OneWayCodec()
        {
            public byte[] code(byte[] data) throws Exception
            {
                return transcode(decoderFactory, data);
            }
View Full Code Here

Examples of org.szegedi.spring.web.jsflow.codec.support.OneWayCodec

        };
    }
   
    public OneWayCodec createEncoder() throws Exception
    {
        return new OneWayCodec()
        {
            public byte[] code(byte[] data) throws Exception
            {
                return transcode(encoderFactory, data);
            }
View Full Code Here

Examples of org.szegedi.spring.web.jsflow.codec.support.OneWayCodec

    private static byte[] transcode(SoftPooledFactory factory, byte[] data) throws Exception
    {
        for(;;)
        {
            Reference ref = factory.get();
            OneWayCodec codec = (OneWayCodec)ref.get();
            if(codec != null)
            {
                try
                {
                    return codec.code(data);
                }
                finally
                {
                    factory.put(ref);
                }
View Full Code Here

Examples of org.szegedi.spring.web.jsflow.codec.support.OneWayCodec

        else
        {
            cipher.init(mode, secretKey, algorithmParameters);
        }
       
        return new OneWayCodec()
        {
            public byte[] code(byte[] data) throws Exception
            {
                return cipher.doFinal(data);
            }
View Full Code Here

Examples of org.szegedi.spring.web.jsflow.codec.support.OneWayCodec

    public OneWayCodec createDecoder() throws Exception
    {
        final Signature signature = Signature.getInstance(signatureAlgorithmName);
        signature.initVerify(keyPair.getPublic());
       
        return new OneWayCodec()
        {

            public byte[] code(byte[] data) throws Exception
            {
                int dataLen = data.length - signatureLength;
View Full Code Here

Examples of org.szegedi.spring.web.jsflow.codec.support.OneWayCodec

    public OneWayCodec createEncoder() throws Exception
    {
        final Signature signature = Signature.getInstance(signatureAlgorithmName);
        signature.initSign(keyPair.getPrivate());
       
        return new OneWayCodec()
        {

            public byte[] code(byte[] data) throws Exception
            {
                int dataLen = data.length;
View Full Code Here

Examples of org.szegedi.spring.web.jsflow.codec.support.OneWayCodec

        return compositeOneWayCodec(oneways);
    }

    private static OneWayCodec compositeOneWayCodec(final OneWayCodec[] codecs)
    {
        return new OneWayCodec()
        {
            public byte[] code(byte[] data) throws Exception
            {
                for(int i = 0; i < codecs.length; ++i)
                {
View Full Code Here
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.