Package one.nio.serial
Class Serializer<T>
java.lang.Object
one.nio.serial.Serializer<T>
- All Implemented Interfaces:
Externalizable,Serializable
- Direct Known Subclasses:
CollectionSerializer,EnumSerializer,ExternalizableSerializer,GeneratedSerializer,HttpRequestSerializer,JavaTimeSerializer,MapSerializer,MethodSerializer,ObjectArraySerializer
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidcalcSize(T obj, CalcSizeStream css) cls()byte[]code()static Objectdeserialize(byte[] data) booleanabstract TfromJson(JsonReader in) fromString(String s) protected final voidinthashCode()static byte[]abstract Tread(DataStream in) voidstatic byte[]static intabstract voidskip(DataStream in) voidvoidtoJson(StringBuilder sb) abstract voidtoJson(T obj, StringBuilder builder) toString()longuid()protected final StringuniqueName(String prefix) abstract voidwrite(T obj, DataStream out) void
-
Field Details
-
descriptor
-
uid
protected long uid -
cls
-
origin
protected one.nio.serial.Origin origin
-
-
Constructor Details
-
Serializer
-
-
Method Details
-
uid
public long uid() -
cls
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
skipExternal
- Throws:
IOExceptionClassNotFoundException
-
code
public byte[] code() -
uniqueName
-
generateUid
protected final void generateUid() -
toJson
-
toString
-
equals
-
hashCode
public int hashCode() -
calcSize
- Throws:
IOException
-
write
- Throws:
IOException
-
read
- Throws:
IOExceptionClassNotFoundException
-
skip
- Throws:
IOExceptionClassNotFoundException
-
toJson
- Throws:
IOException
-
fromJson
- Throws:
IOExceptionClassNotFoundException
-
fromString
- Throws:
IOExceptionClassNotFoundException
-
sizeOf
- Throws:
IOException
-
serialize
- Throws:
IOException
-
persist
- Throws:
IOException
-
deserialize
- Throws:
IOExceptionClassNotFoundException
-