示例#1
0
  /** Load a object of type 'clazz' from a file. */
  public <T> T load(Class<T> clazz, InputStream is) throws JAXBException {
    Context context;
    T object;

    context = getContext(clazz);
    synchronized (context) {
      object = (T) context.unmarshal(is);
      return object;
    }
  }