Package com.ovea.jetty.session

Examples of com.ovea.jetty.session.SerializerException


    @Override
    public String serialize(Object o) throws SerializerException {
        try {
            return mapper.writeValueAsString(o);
        } catch (IOException e) {
            throw new SerializerException(e);
        }
    }
View Full Code Here


    @Override
    public <T> T deserialize(String o, Class<T> targetType) throws SerializerException {
        try {
            return mapper.readValue(o, targetType);
        } catch (IOException e) {
            throw new SerializerException(e);
        }
    }
View Full Code Here

            } else {
                write(baos, o);
            }
            return String.valueOf(B64Code.encode(baos.toByteArray(), false));
        } catch (Exception e) {
            throw new SerializerException("Error serializing " + o + " : " + e.getMessage(), e);
        }
    }
View Full Code Here

    public final <T> T deserialize(String o, Class<T> targetType) throws SerializerException {
        try {
            ByteArrayInputStream bais = new ByteArrayInputStream(B64Code.decode(o));
            return targetType.cast(read(gzip ? new GZIPInputStream(bais) : bais));
        } catch (Exception e) {
            throw new SerializerException("Error deserializing " + o + " : " + e.getMessage(), e);
        }
    }
View Full Code Here

TOP

Related Classes of com.ovea.jetty.session.SerializerException

Copyright © 2018 www.massapicom. 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.