本文整理了Java中org.jboss.resteasy.util.Base64.encodeObject()
方法的一些代码示例,展示了Base64.encodeObject()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Base64.encodeObject()
方法的具体详情如下:
包路径:org.jboss.resteasy.util.Base64
类名称:Base64
方法名:encodeObject
[英]Serializes an object and returns the Base64-encoded version of that serialized object.
As of v 2.3, if the object cannot be serialized or there is another error, the method will throw an java.io.IOException. This is new to v2.3! In earlier versions, it just returned a null value, but in retrospect that's a pretty poor way to handle it.
The object is not GZip-compressed before being encoded.
[中]序列化对象并返回该序列化对象的Base64编码版本。
从v2.3开始,如果对象无法序列化或出现另一个错误,该方法将抛出java。木卫一。例外。这是v2的新特性。3.在早期版本中,它只是返回一个空值,但在retrospect中,这是一种非常糟糕的处理方法。
该对象在编码之前未进行GZip压缩。
代码示例来源:origin: resteasy/Resteasy
/**
* Serializes an object and returns the Base64-encoded
* version of that serialized object.
* <p>As of v 2.3, if the object
* cannot be serialized or there is another error,
* the method will throw an java.io.IOException. <b>This is new to v2.3!</b>
* In earlier versions, it just returned a null value, but
* in retrospect that's a pretty poor way to handle it.</p>
* <p>
* The object is not GZip-compressed before being encoded.
*
* @param serializableObject The object to encode
* @return The Base64-encoded object
* @throws java.io.IOException if there is an error
* @throws NullPointerException if serializedObject is null
* @since 1.4
*/
public static String encodeObject(java.io.Serializable serializableObject)
throws java.io.IOException
{
return encodeObject(serializableObject, NO_OPTIONS);
} // end encodeObject
代码示例来源:origin: org.jboss.resteasy/resteasy-core
/**
* Serializes an object and returns the Base64-encoded
* version of that serialized object.
* <p>As of v 2.3, if the object
* cannot be serialized or there is another error,
* the method will throw an java.io.IOException. <b>This is new to v2.3!</b>
* In earlier versions, it just returned a null value, but
* in retrospect that's a pretty poor way to handle it.</p>
* <p>
* The object is not GZip-compressed before being encoded.
*
* @param serializableObject The object to encode
* @return The Base64-encoded object
* @throws java.io.IOException if there is an error
* @throws NullPointerException if serializedObject is null
* @since 1.4
*/
public static String encodeObject(java.io.Serializable serializableObject)
throws java.io.IOException
{
return encodeObject(serializableObject, NO_OPTIONS);
} // end encodeObject
代码示例来源:origin: org.jboss.resteasy/resteasy-jaxrs-20
/**
* Serializes an object and returns the Base64-encoded
* version of that serialized object.
* <p/>
* <p>As of v 2.3, if the object
* cannot be serialized or there is another error,
* the method will throw an java.io.IOException. <b>This is new to v2.3!</b>
* In earlier versions, it just returned a null value, but
* in retrospect that's a pretty poor way to handle it.</p>
* <p/>
* The object is not GZip-compressed before being encoded.
*
* @param serializableObject The object to encode
* @return The Base64-encoded object
* @throws java.io.IOException if there is an error
* @throws NullPointerException if serializedObject is null
* @since 1.4
*/
public static String encodeObject(java.io.Serializable serializableObject)
throws java.io.IOException
{
return encodeObject(serializableObject, NO_OPTIONS);
} // end encodeObject
内容来源于网络,如有侵权,请联系作者删除!