Open martinrosstmc opened 6 years ago
Any chance that we can get a built-in class for java.sql.Timestamp ala below
public class FSTTimestampSerializer extends FSTBasicObjectSerializer {
@Override public void writeObject(FSTObjectOutput out, Object toWrite, FSTClazzInfo clzInfo, FSTFieldInfo referencedBy, int streamPosition) throws IOException { out.writeLong(((java.sql.Timestamp)toWrite).getTime()); } @Override public boolean alwaysCopy(){ return true; } @Override public Object instantiate(Class objectClass, FSTObjectInput in, FSTClazzInfo serializationInfo, FSTClazzInfo.FSTFieldInfo referencee, int streamPosition) throws Exception { long l = in.readLong(); Object res = new java.sql.Timestamp(l); return res; }
}
You can provide a pull request.
Any chance that we can get a built-in class for java.sql.Timestamp ala below
public class FSTTimestampSerializer extends FSTBasicObjectSerializer {
}