com.jme3.network.serializing
クラス Serializer

java.lang.Object
  上位を拡張 com.jme3.network.serializing.Serializer
直系の既知のサブクラス:
ArraySerializer, BooleanSerializer, ByteSerializer, CharSerializer, CollectionSerializer, DateSerializer, DoubleSerializer, EnumSerializer, FieldSerializer, FloatSerializer, GZIPSerializer, IntSerializer, LongSerializer, MapSerializer, RmiSerializer, SavableSerializer, SerializableSerializer, ShortSerializer, StringSerializer, Vector3Serializer, ZIPSerializer

public abstract class Serializer
extends java.lang.Object

The main serializer class, which will serialize objects such that they can be sent across the network. Serializing classes should extend this to provide their own serialization.


コンストラクタの概要
Serializer()
           
 
メソッドの概要
static Serializer getExactSerializer(java.lang.Class cls)
           
static SerializerRegistration getExactSerializerRegistration(java.lang.Class cls)
           
static Serializer getSerializer(java.lang.Class cls)
           
static Serializer getSerializer(java.lang.Class cls, boolean failOnMiss)
           
static SerializerRegistration getSerializerRegistration(java.lang.Class cls)
           
static SerializerRegistration getSerializerRegistration(java.lang.Class cls, boolean failOnMiss)
           
 void initialize(java.lang.Class clazz)
          Registration for when a serializer may need to cache something.
static SerializerRegistration readClass(java.nio.ByteBuffer buffer)
          Read the class from given buffer and return its SerializerRegistration.
static java.lang.Object readClassAndObject(java.nio.ByteBuffer buffer)
          Read the class and the object.
abstract
<T> T
readObject(java.nio.ByteBuffer data, java.lang.Class<T> c)
          Read an object from the buffer, effectively deserializing it.
static SerializerRegistration registerClass(java.lang.Class cls)
           
static SerializerRegistration registerClass(java.lang.Class cls, boolean failOnMiss)
          Registers the specified class.
static SerializerRegistration registerClass(java.lang.Class cls, Serializer serializer)
           
static SerializerRegistration[] registerPackage(java.lang.String pkgName)
          推奨されていません。 This cannot be implemented in a reasonable way that works in all deployment methods.
static void setStrictRegistration(boolean b)
          When set to true, classes that do not have intrinsic IDs in their
static SerializerRegistration writeClass(java.nio.ByteBuffer buffer, java.lang.Class type)
          Write a class and return its SerializerRegistration.
static void writeClassAndObject(java.nio.ByteBuffer buffer, java.lang.Object object)
          Write the class and object.
abstract  void writeObject(java.nio.ByteBuffer buffer, java.lang.Object object)
          Write an object to the buffer, effectively serializing it.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Serializer

public Serializer()
メソッドの詳細

setStrictRegistration

public static void setStrictRegistration(boolean b)
When set to true, classes that do not have intrinsic IDs in their


registerClass

public static SerializerRegistration registerClass(java.lang.Class cls)

registerClass

public static SerializerRegistration registerClass(java.lang.Class cls,
                                                   boolean failOnMiss)
Registers the specified class. The failOnMiss flag controls whether or not this method returns null for failed registration or throws an exception.


registerPackage

@Deprecated
public static SerializerRegistration[] registerPackage(java.lang.String pkgName)
推奨されていません。 This cannot be implemented in a reasonable way that works in all deployment methods.


registerClass

public static SerializerRegistration registerClass(java.lang.Class cls,
                                                   Serializer serializer)

getExactSerializer

public static Serializer getExactSerializer(java.lang.Class cls)

getSerializer

public static Serializer getSerializer(java.lang.Class cls)

getSerializer

public static Serializer getSerializer(java.lang.Class cls,
                                       boolean failOnMiss)

getExactSerializerRegistration

public static SerializerRegistration getExactSerializerRegistration(java.lang.Class cls)

getSerializerRegistration

public static SerializerRegistration getSerializerRegistration(java.lang.Class cls)

getSerializerRegistration

public static SerializerRegistration getSerializerRegistration(java.lang.Class cls,
                                                               boolean failOnMiss)

readClass

public static SerializerRegistration readClass(java.nio.ByteBuffer buffer)
Read the class from given buffer and return its SerializerRegistration.

パラメータ:
buffer - The buffer to read from.
戻り値:
The SerializerRegistration, or null if non-existent.

readClassAndObject

public static java.lang.Object readClassAndObject(java.nio.ByteBuffer buffer)
                                           throws java.io.IOException
Read the class and the object.

パラメータ:
buffer - Buffer to read from.
戻り値:
The Object that was read.
例外:
java.io.IOException - If serialization failed.

writeClass

public static SerializerRegistration writeClass(java.nio.ByteBuffer buffer,
                                                java.lang.Class type)
Write a class and return its SerializerRegistration.

パラメータ:
buffer - The buffer to write the given class to.
type - The class to write.
戻り値:
The SerializerRegistration that's registered to the class.

writeClassAndObject

public static void writeClassAndObject(java.nio.ByteBuffer buffer,
                                       java.lang.Object object)
                                throws java.io.IOException
Write the class and object.

パラメータ:
buffer - The buffer to write to.
object - The object to write.
例外:
java.io.IOException - If serializing fails.

readObject

public abstract <T> T readObject(java.nio.ByteBuffer data,
                                 java.lang.Class<T> c)
                      throws java.io.IOException
Read an object from the buffer, effectively deserializing it.

パラメータ:
data - The buffer to read from.
c - The class of the object.
戻り値:
The object read.
例外:
java.io.IOException - If deserializing fails.

writeObject

public abstract void writeObject(java.nio.ByteBuffer buffer,
                                 java.lang.Object object)
                          throws java.io.IOException
Write an object to the buffer, effectively serializing it.

パラメータ:
buffer - The buffer to write to.
object - The object to serialize.
例外:
java.io.IOException - If serializing fails.

initialize

public void initialize(java.lang.Class clazz)
Registration for when a serializer may need to cache something. Override to use.

パラメータ:
clazz - The class that has been registered to the serializer.