Package com.esotericsoftware.kryo

Examples of com.esotericsoftware.kryo.SerializationException


    BeanInfo info;
    try {
      info = Introspector.getBeanInfo(type);
    } catch (IntrospectionException ex) {
      throw new SerializationException("Error getting bean info.", ex);
    }
    // Methods are sorted by alpha so the order of the data is known.
    PropertyDescriptor[] descriptors = info.getPropertyDescriptors();
    Arrays.sort(descriptors, new Comparator<PropertyDescriptor>() {
      public int compare (PropertyDescriptor o1, PropertyDescriptor o2) {
View Full Code Here


        if (serializer != null)
          serializer.writeObject(buffer, value);
        else
          kryo.writeClassAndObject(buffer, value);
      } catch (IllegalAccessException ex) {
        throw new SerializationException("Error accessing getter method: " + property + " (" + type.getName() + ")", ex);
      } catch (InvocationTargetException ex) {
        throw new SerializationException("Error invoking getter method: " + property + " (" + type.getName() + ")", ex);
      } catch (SerializationException ex) {
        ex.addTrace(property + " (" + type.getName() + ")");
        throw ex;
      } catch (RuntimeException runtimeEx) {
        SerializationException ex = new SerializationException(runtimeEx);
        ex.addTrace(property + " (" + type.getName() + ")");
        throw ex;
      }
    }
    if (TRACE) trace("kryo", "Wrote bean: " + object);
  }
View Full Code Here

          value = serializer.readObject(buffer, property.setMethodType);
        else
          value = kryo.readClassAndObject(buffer);
        property.set(object, value);
      } catch (IllegalAccessException ex) {
        throw new SerializationException("Error accessing setter method: " + property + " (" + type.getName() + ")", ex);
      } catch (InvocationTargetException ex) {
        throw new SerializationException("Error invoking setter method: " + property + " (" + type.getName() + ")", ex);
      } catch (SerializationException ex) {
        ex.addTrace(property + " (" + type.getName() + ")");
        throw ex;
      } catch (RuntimeException runtimeEx) {
        SerializationException ex = new SerializationException(runtimeEx);
        ex.addTrace(property + " (" + type.getName() + ")");
        throw ex;
      }
    }
    if (TRACE) trace("kryo", "Read bean: " + object);
    return object;
View Full Code Here

    }

    int reference = IntSerializer.get(buffer, true);
    if (reference != 0) {
      T object = (T)references.referenceToObject.get(reference);
      if (object == null) throw new SerializationException("Invalid object reference: " + reference);
      if (TRACE) trace("kryo", "Read object reference " + reference + ": " + object);
      return object;
    }

    T object = newInstance(kryo, type);
View Full Code Here

      if ((b & 0x80) == 0) {
        if (!optimizePositive) result = (result >>> 1) ^ -(result & 1);
        return result;
      }
    }
    throw new SerializationException("Malformed long.");
  }
View Full Code Here

TOP

Related Classes of com.esotericsoftware.kryo.SerializationException

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.