Package util
Class Serializer
- java.lang.Object
-
- util.Serializer
-
public class Serializer extends java.lang.Object- Author:
- GBEMIRO JIBOYE
-
-
Constructor Summary
Constructors Constructor Description Serializer()
-
-
-
Method Detail
-
serialize
public static final java.lang.String serialize(Savable yourObject)
- Parameters:
yourObject- Serializes the object to a byte array and returns it as a pstring printed as: [num1, num2, num3, num4, .....]- Returns:
- a string representation for the byte array representation of the object.
-
deserialize
public static final Savable deserialize(java.lang.String encoded)
-
getBytes
public static final byte[] getBytes(java.lang.String ser)
- Parameters:
ser- The serialized format for the byte array of the object- Returns:
- the byte array from the serialized format of the object
-
ser
public static final byte[] ser(Savable yourObject)
Prepare the byte array- Parameters:
yourObject-- Returns:
-
main
public static void main(java.lang.String[] args)
-
-