KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > io > serializer > api > Serializer


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.io.serializer.api;
5
6 import java.io.IOException JavaDoc;
7 import java.io.ObjectInput JavaDoc;
8 import java.io.ObjectOutput JavaDoc;
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 JavaDoc o, ObjectOutput JavaDoc out) throws IOException JavaDoc;
29
30   public Object JavaDoc deserializeFrom(ObjectInput JavaDoc in) throws IOException JavaDoc, ClassNotFoundException JavaDoc;
31
32   public byte getSerializerID();
33 }
Popular Tags