Examples of MessageTypeException


Examples of org.msgpack.MessageTypeException

        // optimized not to allocate byteAccept
        stack.checkCount();
        readOneWithoutStack(intAccept);
        int value = intAccept.value;
        if(value < (int)Byte.MIN_VALUE || value > (int)Byte.MAX_VALUE) {
            throw new MessageTypeException()// TODO message
        }
        stack.reduceCount();
        return (byte)value;
    }
View Full Code Here

Examples of org.msgpack.MessageTypeException

        // optimized not to allocate shortAccept
        stack.checkCount();
        readOneWithoutStack(intAccept);
        int value = intAccept.value;
        if(value < (int)Short.MIN_VALUE || value > (int)Short.MAX_VALUE) {
            throw new MessageTypeException()// TODO message
        }
        stack.reduceCount();
        return (short)value;
    }
View Full Code Here

Examples of org.msgpack.core.MessageTypeException

    protected <E extends Value> E as(Class<E> valueClass, ValueType vt) {
        return as(valueClass, 1 << vt.ordinal());
    }
    protected <E extends Value> E as(Class<E> valueClass, int bitMask) {
        if(this.getValueType() == null)
            throw new MessageTypeException("This value points to nothing");
        if(!this.getValueType().isTypeOf(bitMask))
            throw new MessageTypeException(String.format("Expected %s, but %s", valueClass.getSimpleName(), this.getValueType()));
        return valueClass.cast(this);
    }
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.