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: /**
13: * Double
14: */
15: public final class DoubleSerializer implements Serializer {
16:
17: public void serializeTo(Object o, ObjectOutput out)
18: throws IOException {
19: out.writeDouble(((Double) o).doubleValue());
20: }
21:
22: public Object deserializeFrom(ObjectInput in) throws IOException {
23: return new Double(in.readDouble());
24: }
25:
26: public byte getSerializerID() {
27: return DOUBLE;
28: }
29:
30: }
|