1 29 30 package com.caucho.jaxb.skeleton; 31 import javax.xml.bind.DatatypeConverter; 32 import javax.xml.stream.XMLStreamException; 33 import java.io.IOException ; 34 import java.math.BigInteger ; 35 36 39 public class BigIntegerProperty extends CDataProperty { 40 public static final BigIntegerProperty PROPERTY = new BigIntegerProperty(); 41 42 protected String write(Object in) 43 throws IOException , XMLStreamException 44 { 45 return DatatypeConverter.printInteger((BigInteger ) in); 46 } 47 48 protected Object read(String in) 49 throws IOException , XMLStreamException 50 { 51 return DatatypeConverter.parseInteger(in); 52 } 53 54 public String getSchemaType() 55 { 56 return "xsd:integer"; 57 } 58 59 public boolean isXmlPrimitiveType() 60 { 61 return true; 62 } 63 } 64 65 66 | Popular Tags |