Open GoogleCodeExporter opened 8 years ago
See http://code.google.com/p/protostuff/wiki/Delegate
Its easy to add, for example java.sql.Date:
public void writeTo(Output output, int number, java.sql.Date value,
boolean repeated) throws IOException
{
output.writeFixed64(number, value.getTime(), repeated);
}
public java.sql.Date readFrom(Input input) throws IOException
{
return new java.sql.Date(input.readFixed64());
}
If you want the string representation:
public void writeTo(Output output, int number, java.sql.Date value,
boolean repeated) throws IOException
{
output.writeString(number, value.toString(), repeated);
}
public java.sql.Date readFrom(Input input) throws IOException
{
return java.sql.Date.valueOf(input.readString());
}
Original comment by david.yu...@gmail.com
on 3 Sep 2012 at 8:43
Thanks, David. Do you think it is a good idea to natively (out of the box)
support these classes ?
Original comment by aser...@gmail.com
on 4 Sep 2012 at 3:01
Original issue reported on code.google.com by
aser...@gmail.com
on 3 Sep 2012 at 6:34