public static WorkspaceComponent deserializeWorkspaceComponent(final Class<?> clazz,final String name,final InputStream input,final String format){
  try {
    Method method=clazz.getMethod("open",InputStream.class,String.class,String.class);
    WorkspaceComponent wc=(WorkspaceComponent)method.invoke(null,input,name,format);
    wc.setChangedSinceLastSave(false);
    return wc;
  }
 catch (  RuntimeException e) {
    throw e;
  }
catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

public static WorkspaceComponent deserializeWorkspaceComponent ( final Class < ? > clazz , final String name , final InputStream input , final String format ) { try { Method method = clazz . getMethod ( "open" , InputStream . class , String . class , String . class ) ; WorkspaceComponent wc = ( WorkspaceComponent ) method . invoke ( null , input , name , format ) ; wc . setChangedSinceLastSave ( false ) ; return wc ; } catch ( RuntimeException e ) { throw e ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
deserialized a component for the given class , input and input format .
