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.impl;
05:
06: import com.tc.io.serializer.api.Serializer;
07:
08: import java.io.IOException;
09: import java.io.ObjectInput;
10: import java.io.ObjectOutput;
11:
12: public class StringUTFSerializer implements Serializer {
13:
14: public void serializeTo(Object o, ObjectOutput out)
15: throws IOException {
16: out.writeUTF((String) o);
17: }
18:
19: public Object deserializeFrom(ObjectInput in) throws IOException {
20: return in.readUTF();
21: }
22:
23: public byte getSerializerID() {
24: return STRING_UTF;
25: }
26:
27: }
|