本文整理汇总了Java中net.iharder.Base64.encodeObject方法的典型用法代码示例。如果您正苦于以下问题:Java Base64.encodeObject方法的具体用法?Java Base64.encodeObject怎么用?Java Base64.encodeObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.iharder.Base64
的用法示例。
在下文中一共展示了Base64.encodeObject方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: prepareCtlSchemaExport
import net.iharder.Base64; //导入方法依赖的package包/类
@Override
public String prepareCtlSchemaExport(String ctlSchemaId,
CTLSchemaExportMethod method)
throws KaaAdminServiceException {
checkAuthority(KaaAuthorityDto.values());
try {
CTLSchemaDto schemaFound = controlService.getCtlSchemaById(ctlSchemaId);
Utils.checkNotNull(schemaFound);
checkCtlSchemaReadScope(
schemaFound.getMetaInfo().getTenantId(), schemaFound.getMetaInfo().getApplicationId());
CtlSchemaExportKey key = new CtlSchemaExportKey(ctlSchemaId, method);
return Base64.encodeObject(key, Base64.URL_SAFE);
} catch (Exception ex) {
throw Utils.handleException(ex);
}
}
示例2: storeLatestAlert
import net.iharder.Base64; //导入方法依赖的package包/类
/**
* 警報情報を保存する。
*
* @param alert 警報情報
*/
private void storeLatestAlert(@NonNull Alert alert) {
try {
final String string = Base64.encodeObject(alert);
getPreferences(mContext).edit().putString(KEY_LATEST_ALERT, string).commit();
} catch (IOException e) {
Log.e(TAG, ExceptionUtils.getStackTrace(e));
}
}
示例3: getRecordDataByApplicationIdAndSchemaVersion
import net.iharder.Base64; //导入方法依赖的package包/类
@Override
public String getRecordDataByApplicationIdAndSchemaVersion(String applicationId,
int schemaVersion,
RecordKey.RecordFiles file)
throws KaaAdminServiceException {
checkAuthority(KaaAuthorityDto.TENANT_DEVELOPER, KaaAuthorityDto.TENANT_USER);
try {
checkApplicationId(applicationId);
RecordKey sdkKey = new RecordKey(applicationId, schemaVersion, file);
return Base64.encodeObject(sdkKey, Base64.URL_SAFE);
} catch (Exception ex) {
throw Utils.handleException(ex);
}
}
示例4: getRecordLibraryByApplicationIdAndSchemaVersion
import net.iharder.Base64; //导入方法依赖的package包/类
@Override
public String getRecordLibraryByApplicationIdAndSchemaVersion(String applicationId,
int logSchemaVersion,
RecordKey.RecordFiles file)
throws KaaAdminServiceException {
checkAuthority(KaaAuthorityDto.TENANT_DEVELOPER, KaaAuthorityDto.TENANT_USER);
try {
checkApplicationId(applicationId);
RecordKey sdkKey = new RecordKey(applicationId, logSchemaVersion, file);
return Base64.encodeObject(sdkKey, Base64.URL_SAFE);
} catch (Exception ex) {
throw Utils.handleException(ex);
}
}
示例5: generateSdk
import net.iharder.Base64; //导入方法依赖的package包/类
@Override
public String generateSdk(SdkProfileDto sdkProfile, SdkPlatform targetPlatform)
throws KaaAdminServiceException {
try {
doGenerateSdk(sdkProfile, targetPlatform);
return Base64.encodeObject(
new CacheService.SdkKey(sdkProfile, targetPlatform), Base64.URL_SAFE);
} catch (Exception ex) {
throw Utils.handleException(ex);
}
}
示例6: serialize
import net.iharder.Base64; //导入方法依赖的package包/类
public static String serialize(Serializable object) {
try {
return new String(Base64.encodeObject(object));
} catch (IOException e) {
return null;
}
}