クラス SerializationUtils
- java.lang.ObjectSE
-
- org.springframework.amqp.utils.SerializationUtils
public final class SerializationUtils extends ObjectSE
直列化を支援する静的ユーティリティ。- 作成者:
- Dave Syer, Gary Russell
方法の概要
すべてのメソッド 静的メソッド 具象メソッド 修飾子と型 メソッド 説明 static voidcheckAllowedList(ClassSE<?> clazz, SetSE<StringSE> patterns)クラスが許可リストにあることを確認します。static ObjectSEdeserialize(byte[] bytes)バイトを逆直列化します。static ObjectSEdeserialize(InputStreamSE inputStream, SetSE<StringSE> allowedListPatterns, ClassLoaderSE classLoader)ストリームを逆直列化します。static ObjectSEdeserialize(ObjectInputStreamSE stream)ストリームを逆直列化します。static byte[]serialize(ObjectSE object)提供されたオブジェクトを直列化します。
メソッドの詳細
serialize
public static byte[] serialize(ObjectSE object)
提供されたオブジェクトを直列化します。- パラメーター:
object- 直列化するオブジェクト- 戻り値:
- 移植可能な方法でオブジェクトを表すバイトの配列
deserialize
public static ObjectSE deserialize(byte[] bytes)
バイトを逆直列化します。- パラメーター:
bytes- 作成された直列化されたオブジェクト- 戻り値:
- バイトを逆直列化した結果
deserialize
public static ObjectSE deserialize(ObjectInputStreamSE stream)
ストリームを逆直列化します。- パラメーター:
stream- 直列化されたオブジェクトから作成されたオブジェクトストリーム- 戻り値:
- バイトを逆直列化した結果
deserialize
public static ObjectSE deserialize(InputStreamSE inputStream, SetSE<StringSE> allowedListPatterns, ClassLoaderSE classLoader) throws IOExceptionSE
ストリームを逆直列化します。- パラメーター:
inputStream- ストリーム。allowedListPatterns- 許可されたクラス。classLoader- クラスローダー。- 戻り値:
- 結果。
- 例外:
IOExceptionSE- IO 例外。- 導入:
- 2.1