01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.io.serializer.api;
05:
06: import java.io.IOException;
07: import java.io.ObjectInput;
08: import java.io.ObjectOutput;
09:
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)
29: throws IOException;
30:
31: public Object deserializeFrom(ObjectInput in) throws IOException,
32: ClassNotFoundException;
33:
34: public byte getSerializerID();
35: }
|