01: /*
02: * Copyright (C) 2004, 2005 Joe Walnes.
03: * Copyright (C) 2006, 2007 XStream Committers.
04: * All rights reserved.
05: *
06: * The software in this package is published under the terms of the BSD
07: * style license a copy of which has been included with this distribution in
08: * the LICENSE.txt file.
09: *
10: * Created on 06. May 2004 by Joe Walnes
11: */
12: package com.thoughtworks.xstream.converters.basic;
13:
14: import java.text.ParseException;
15: import java.util.Date;
16:
17: /**
18: * Wrapper around java.text.SimpleDateFormat that can
19: * be called by multiple threads concurrently.
20: *
21: * @author Joe Walnes
22: * @deprecated since 1.2.1, moved to com.thoughtworks.xstream.core.util.
23: * It is not part of public API, use on your own risk.
24: */
25: public class ThreadSafeSimpleDateFormat extends
26: com.thoughtworks.xstream.core.util.ThreadSafeSimpleDateFormat {
27:
28: public ThreadSafeSimpleDateFormat(String format,
29: int initialPoolSize, int maxPoolSize) {
30: super (format, initialPoolSize, maxPoolSize, true);
31: }
32:
33: public String format(Date date) {
34: return super .format(date);
35: }
36:
37: public Date parse(String date) throws ParseException {
38: return super.parse(date);
39: }
40: }
|