パッケージ org.piax.util
クラス SerializingUtil
java.lang.Object
org.piax.util.SerializingUtil
public class SerializingUtil extends Object
バイト列の serialize/deserialize をサポートするユーティリティ。
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 SerializingUtil() -
メソッドの概要
修飾子とタイプ メソッド 説明 static Serializabledeserialize(byte[] bytes)static Serializabledeserialize(byte[] bytes, int offset, int length)static Serializabledeserialize(byte[] bytes, int offset, int length, ClassLoader loader)static Serializabledeserialize(byte[] bytes, ClassLoader loader)static Serializabledeserialize(ByteBuffer bytes)static Serializabledeserialize(ByteBuffer bytes, ClassLoader loader)ByteBufferからオブジェクトをdeserializeする。static byte[]serialize(Object obj)
-
コンストラクタの詳細
-
SerializingUtil
public SerializingUtil()
-
-
メソッドの詳細
-
serialize
-
deserialize
public static Serializable deserialize(ByteBuffer bytes) throws ClassNotFoundException, ObjectStreamException -
deserialize
public static Serializable deserialize(ByteBuffer bytes, ClassLoader loader) throws ClassNotFoundException, ObjectStreamExceptionByteBufferからオブジェクトをdeserializeする。 ByteBufferのpositionは、deserializeされたバイト分進む。- パラメータ:
bytes- ByteBufferloader- loader- 戻り値:
- deserializeされたオブジェクト
- 例外:
ClassNotFoundException- クラスが存在しない場合ObjectStreamException- ObjectStreamに不整合を検知した場合
-
deserialize
public static Serializable deserialize(byte[] bytes) throws ClassNotFoundException, ObjectStreamException -
deserialize
public static Serializable deserialize(byte[] bytes, ClassLoader loader) throws ClassNotFoundException, ObjectStreamException -
deserialize
public static Serializable deserialize(byte[] bytes, int offset, int length) throws ClassNotFoundException, ObjectStreamException -
deserialize
public static Serializable deserialize(byte[] bytes, int offset, int length, ClassLoader loader) throws ClassNotFoundException, ObjectStreamException
-