1 4 package com.tc.io.serializer.api; 5 6 import java.io.IOException ; 7 import java.io.ObjectInput ; 8 import java.io.ObjectOutput ; 9 10 public interface Serializer { 11 12 public static final byte UNKNOWN = 0x00; 13 public static final byte OBJECT_ID = 0x01; 14 public static final byte STRING_INDEX = 0x02; 15 public static final byte STRING_UTF = 0x03; 16 public static final byte BOOLEAN = 0x04; 17 public static final byte BYTE = 0x05; 18 public static final byte CHARACTER = 0x06; 19 public static final byte DOUBLE = 0x07; 20 public static final byte FLOAT = 0x08; 21 public static final byte INTEGER = 0x09; 22 public static final byte LONG = 0x0a; 23 public static final byte SHORT = 0x0b; 24 public static final byte OBJECT = 0x0c; 25 public static final byte MANAGED_OBJECT_STATE = 0x0d; 26 public static final byte MANAGED_OBJECT = 0x0e; 27 28 public void serializeTo(Object o, ObjectOutput out) throws IOException ; 29 30 public Object deserializeFrom(ObjectInput in) throws IOException , ClassNotFoundException ; 31 32 public byte getSerializerID(); 33 } | Popular Tags |