KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thoughtworks > xstream > converters > basic > BigIntegerConverter


1 package com.thoughtworks.xstream.converters.basic;
2
3 import java.math.BigInteger JavaDoc;
4
5 /**
6  * Converts a java.math.BigInteger to a String.
7  *
8  * @author Joe Walnes
9  */

10 public class BigIntegerConverter extends AbstractBasicConverter {
11
12     public boolean canConvert(Class JavaDoc type) {
13         return type.equals(BigInteger JavaDoc.class);
14     }
15
16     protected Object JavaDoc fromString(String JavaDoc str) {
17         return new BigInteger JavaDoc(str);
18     }
19
20 }
21
Popular Tags