org.opensaml.xml.util.Base64.encodeObject()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(143)

本文整理了Java中org.opensaml.xml.util.Base64.encodeObject()方法的一些代码示例,展示了Base64.encodeObject()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Base64.encodeObject()方法的具体详情如下:
包路径:org.opensaml.xml.util.Base64
类名称:Base64
方法名:encodeObject

Base64.encodeObject介绍

[英]Serializes an object and returns the Base64-encoded version of that serialized object. If the object cannot be serialized or there is another error, the method will return null. The object is not GZip-compressed before being encoded.
[中]序列化对象并返回该序列化对象的Base64编码版本。如果对象无法序列化或存在其他错误,则该方法将返回null。该对象在编码之前未进行GZip压缩。

代码示例

代码示例来源:origin: org.opensaml/xmltooling

/**
 * Serializes an object and returns the Base64-encoded version of that serialized object. If the object cannot be
 * serialized or there is another error, the method will return <tt>null</tt>. The object is not GZip-compressed
 * before being encoded.
 * 
 * @param serializableObject The object to encode
 * @return The Base64-encoded object
 * @since 1.4
 */
public static String encodeObject(java.io.Serializable serializableObject) {
  return encodeObject(serializableObject, NO_OPTIONS);
} // end encodeObject

代码示例来源:origin: io.apigee.opensaml/xmltooling

/**
 * Serializes an object and returns the Base64-encoded version of that serialized object. If the object cannot be
 * serialized or there is another error, the method will return <tt>null</tt>. The object is not GZip-compressed
 * before being encoded.
 * 
 * @param serializableObject The object to encode
 * @return The Base64-encoded object
 * @since 1.4
 */
public static String encodeObject(java.io.Serializable serializableObject) {
  return encodeObject(serializableObject, NO_OPTIONS);
} // end encodeObject

相关文章