Examples of StephenerializationException


Examples of com.enragedginger.stephenerialization.StephenerializationException

      final Set<StephenerializableField> fields = getFieldFactory().generateFields(clazz, version);
      for (StephenerializableField field : fields) {
        readField(object, field.getField(), streamer);
      }
    } catch (Exception e) {
      throw new StephenerializationException(ERROR_MSG, e);
    }
  }
View Full Code Here

Examples of com.enragedginger.stephenerialization.StephenerializationException

        break;
      case OBJECT :
        field.set(object, streamer.readObject());
        break;
      default :
        throw new StephenerializationException("Unsupported destephenerialization type: " + type);
    }
  }
View Full Code Here

Examples of com.enragedginger.stephenerialization.StephenerializationException

   */
  public void stephenerialize(Object object,
      StephenerializationStream streamer, Class<?> clazz) {
    final Stephenerializable annotation = clazz.getAnnotation(Stephenerializable.class);
    if (annotation == null) {
      throw new StephenerializationException("The class " + clazz.getName() + " cannot be Stephenerialized "
          + "because it lacks a Stephenerializable annotation.");
    } else {
      final int version = annotation.version();
      final Set<StephenerializableField> fields = getFieldFactory().generateFields(clazz, version);
      try {
        streamer.writeInt(version); // write the version out to the stream
        for (StephenerializableField field : fields) {
          writeField(object, clazz, field.getField(), streamer);
        }
      } catch (Exception e) {
        throw new StephenerializationException(ERROR_MSG, e);
      }
    }
  }
View Full Code Here

Examples of com.enragedginger.stephenerialization.StephenerializationException

        break;
      case OBJECT :
        streamer.writeObject(field.get(object));
        break;
      default :
        throw new StephenerializationException("Unsupported stephenerialization type: " + type);
    }
  }
View Full Code Here

Examples of com.enragedginger.stephenerialization.StephenerializationException

      final Set<StephenerializableField> fields = getFieldFactory().generateFields(clazz, version);
      for (StephenerializableField field : fields) {
        readField(object, clazz, field.getField(), streamer);
      }
    } catch (Exception e) {
      throw new StephenerializationException(ERROR_MSG, e);
    }
  }
View Full Code Here

Examples of com.enragedginger.stephenerialization.StephenerializationException

        break;
      case OBJECT :
        field.set(object, streamer.readObject());
        break;
      default :
        throw new StephenerializationException("Unsupported destephenerialization type: " + type);
    }
  }
View Full Code Here

Examples of com.enragedginger.stephenerialization.StephenerializationException

   */
  public void stephenerialize(Object object,
      StephenerializationStream streamer, Class<?> clazz) {
    final Stephenerializable annotation = clazz.getAnnotation(Stephenerializable.class);
    if (annotation == null) {
      throw new StephenerializationException("The class " + clazz.getName() + " cannot be Stephenerialized "
          + "because it lacks a Stephenerializable annotation.");
    } else {
      final int version = annotation.version();
      final Set<StephenerializableField> fields = getFieldFactory().generateFields(clazz, version);
      try {
        streamer.writeInt(version); // write the version out to the stream
        for (StephenerializableField field : fields) {
          writeField(object, field.getField(), streamer);
        }
      } catch (Exception e) {
        throw new StephenerializationException(ERROR_MSG, e);
      }
    }
  }
View Full Code Here

Examples of com.enragedginger.stephenerialization.StephenerializationException

        break;
      case OBJECT :
        streamer.writeObject(field.get(object));
        break;
      default :
        throw new StephenerializationException("Unsupported stephenerialization type: " + type);
    }
  }
View Full Code Here

Examples of com.enragedginger.stephenerialization.StephenerializationException

  public void stephenerialize(Object object,
      StephenerializationStream streamer) {
    final Class<?> clazz = object.getClass();
    final Stephenerializable annotation = clazz.getAnnotation(Stephenerializable.class);
    if (annotation == null) {
      throw new StephenerializationException("The class " + clazz.getName() + " cannot be Stephenerialized "
          + "because it lacks a Stephenerializable annotation.");
    } else {
      final int version = annotation.version();
      final Set<StephenerializableField> fields = getFieldFactory().generateFields(clazz, version);
      try {
        streamer.writeInt(version); // write the version out to the stream
        for (StephenerializableField field : fields) {
          writeField(object, clazz, field.getField(), streamer);
        }
      } catch (Exception e) {
        throw new StephenerializationException(ERROR_MSG, e);
      }
    }
  }
View Full Code Here

Examples of com.enragedginger.stephenerialization.StephenerializationException

        break;
      case OBJECT :
        streamer.writeObject(field.get(object));
        break;
      default :
        throw new StephenerializationException("Unsupported stephenerialization type: " + type);
    }
  }
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.