/** * Returns the import data object.<p> * * @param value the exported value * @param type the expected data type * * @return the import data object * * @throws ClassNotFoundException if something goes wrong * @throws IOException if something goes wrong */ public static Object dataImport(String value, String type) throws ClassNotFoundException, IOException { Class<?> clazz = Class.forName(type); if (CmsDataTypeUtil.isParseable(clazz)) { return CmsDataTypeUtil.parse(value, clazz); } byte[] data = Base64.decodeBase64(value.getBytes()); return dataDeserialize(data, type); }
/** * Returns the import data object.<p> * * @param value the exported value * @param type the expected data type * * @return the import data object * * @throws ClassNotFoundException if something goes wrong * @throws IOException if something goes wrong */ public static Object dataImport(String value, String type) throws ClassNotFoundException, IOException { Class clazz = Class.forName(type); if (CmsDataTypeUtil.isParseable(clazz)) { return CmsDataTypeUtil.parse(value, clazz); } byte[] data = Base64.decodeBase64(value.getBytes()); return dataDeserialize(data, type); }
data = CmsDataTypeUtil.dataDeserialize(value, type); } catch (Exception e) { LOG.warn(
data = CmsDataTypeUtil.dataDeserialize(value, type); } catch (Exception e) { LOG.error(
data = CmsDataTypeUtil.dataDeserialize(value, type);