public class DatatypeConverterImpl extends Object implements DatatypeConverterInterface
Constructor and Description |
---|
DatatypeConverterImpl() |
Modifier and Type | Method and Description |
---|---|
static DatatypeConverterImpl |
getInstance() |
String |
parseAnySimpleType(String arg0)
Returns the lexical representation of the input string, which is the unmodified input string.
|
byte[] |
parseBase64Binary(String arg0)
Parses the lexical representation of the given byte array, which is encoded in base 64.
|
boolean |
parseBoolean(String arg0)
Parses the lexical representation of the given boolean value and converts it into a primitive
boolean value. |
byte |
parseByte(String arg0)
Parses the lexical representation of the given 8 bit integer value and converts it into a
primitive
byte value. |
Calendar |
parseDate(String arg0)
Parses the lexical representation of the given date value and converts it into an instance of
Calendar . |
Calendar |
parseDateTime(String arg0)
Parses the lexical representation of the given dateTime value and converts it into an
instance of
Calendar . |
Calendar |
parseDateTime(String arg0,
boolean lenient)
Parses the lexical representation of the given dateTime value and converts it into an
instance of
Calendar . |
BigDecimal |
parseDecimal(String arg0)
Parses the lexical representation of the given decimal value (arbitrary precision) and
converts it into an instance of
BigDecimal . |
double |
parseDouble(String arg0)
Parses the lexical representation of the given 64 bit floating point value and converts it
into a primitive
double value. |
Duration |
parseDuration(String pDuration) |
float |
parseFloat(String arg0)
Parses the lexical representation of the given 32 bit floating point value and converts it
into a primitive
float value. |
byte[] |
parseHexBinary(String arg0)
Parses the lexical representation of the given byte array, which is encoded in hex digits.
|
int |
parseInt(String arg0)
Parses the lexical representation of the given 32 bit integer value and converts it into a
primitive
int value. |
BigInteger |
parseInteger(String arg0)
Parses the lexical representation of the given integer value (arbitrary precision) and
converts it into an instance of
BigInteger . |
long |
parseLong(String arg0)
Parses the lexical representation of the given 64 bit integer value and converts it into a
primitive
long value. |
QName |
parseQName(String arg0,
NamespaceContext arg1)
Parses the lexical representation of the given qualified name and converts it into an
instance of
QName . |
short |
parseShort(String arg0)
Parses the lexical representation of the given 16 bit integer value and converts it into a
primitive
short value. |
String |
parseString(String arg0)
Parses the lexical representation and converts it into a String.
|
Calendar |
parseTime(String arg0)
Parses the lexical representation of the given time value and converts it into an instance of
Calendar . |
long |
parseUnsignedInt(String arg0)
Parses the lexical representation of the given 32 bit unsignet integer value and converts it
into a primitive
long value. |
int |
parseUnsignedShort(String arg0)
Parses the lexical representation of the given 16 bit unsignet integer value and converts it
into a primitive
int value. |
String |
printAnySimpleType(String arg0)
Returns a lexical representation of the given input string, which is the unmodified input
string.
|
String |
printBase64Binary(byte[] arg0)
Returns a lexical representation of the given byte array.
|
String |
printBoolean(boolean arg0)
Returns a lexical representation of the given primitive boolean value.
|
String |
printByte(byte arg0)
Returns a lexical representation of the given primitive 8 bit integer.
|
String |
printDate(Calendar arg0)
Returns a lexical representation of the given date value.
|
String |
printDateTime(Calendar arg0)
Returns a lexical representation of the given dateTime value.
|
String |
printDecimal(BigDecimal arg0)
Returns a lexical representation of the given instance of
BigDecimal , which is a
decimal number in arbitrary precision. |
String |
printDouble(double arg0)
Returns a lexical representation of the given primitive 64 bit floating point number.
|
String |
printDuration(Duration pDuration) |
String |
printFloat(float arg0)
Returns a lexical representation of the given primitive 32 bit floating point number.
|
String |
printHexBinary(byte[] arg0)
Returns a lexical representation of the given byte array.
|
String |
printInt(int arg0)
Returns a lexical representation of the given primitive 32 bit integer.
|
String |
printInteger(BigInteger arg0)
Returns a lexical representation of the given instance of
BigInteger , which is an
integer in arbitrary precision. |
String |
printLong(long arg0)
Returns a lexical representation of the given primitive 64 bit integer.
|
String |
printQName(QName arg0,
NamespaceContext arg1)
Returns a lexical representation of the given qualified name, which is a combination of
namespace URI and local name.
|
String |
printShort(short arg0)
Returns a lexical representation of the given primitive 16 bit integer.
|
String |
printString(String arg0)
Returns a lexical representation of the given input string, which is the unmodified input
string.
|
String |
printTime(Calendar arg0)
Returns a lexical representation of the given time value.
|
String |
printUnsignedInt(long arg0)
Returns a lexical representation of the given primitive, unsigned 32 bit integer.
|
String |
printUnsignedShort(int arg0)
Returns a lexical representation of the given primitive, unsigned 16 bit integer.
|
public static DatatypeConverterImpl getInstance()
public String parseString(String arg0)
DatatypeConverterInterface
parseString
in interface DatatypeConverterInterface
arg0
- The input string being parsed.ParseConversionEvent
public BigInteger parseInteger(String arg0)
DatatypeConverterInterface
BigInteger
.parseInteger
in interface DatatypeConverterInterface
arg0
- The input string being parsed.BigInteger
.ParseConversionEvent
public int parseInt(String arg0)
DatatypeConverterInterface
int
value.parseInt
in interface DatatypeConverterInterface
arg0
- The input string being parsed.int
.ParseConversionEvent
public long parseLong(String arg0)
DatatypeConverterInterface
long
value.parseLong
in interface DatatypeConverterInterface
arg0
- The input string being parsed.long
.ParseConversionEvent
public short parseShort(String arg0)
DatatypeConverterInterface
short
value.parseShort
in interface DatatypeConverterInterface
arg0
- The input string being parsed.short
.ParseConversionEvent
public BigDecimal parseDecimal(String arg0)
DatatypeConverterInterface
BigDecimal
.parseDecimal
in interface DatatypeConverterInterface
arg0
- The input string being parsed.BigDecimal
.ParseConversionEvent
public float parseFloat(String arg0)
DatatypeConverterInterface
float
value.parseFloat
in interface DatatypeConverterInterface
arg0
- The input string being parsed.float
.ParseConversionEvent
public double parseDouble(String arg0)
DatatypeConverterInterface
double
value.parseDouble
in interface DatatypeConverterInterface
arg0
- The input string being parsed.double
.ParseConversionEvent
public boolean parseBoolean(String arg0)
DatatypeConverterInterface
boolean
value.parseBoolean
in interface DatatypeConverterInterface
arg0
- The input string being parsed.boolean
.ParseConversionEvent
public byte parseByte(String arg0)
DatatypeConverterInterface
byte
value.parseByte
in interface DatatypeConverterInterface
arg0
- The input string being parsed.byte
.ParseConversionEvent
public QName parseQName(String arg0, NamespaceContext arg1)
DatatypeConverterInterface
QName
. The QName
consists
of a namespace URI and a local name.parseQName
in interface DatatypeConverterInterface
arg0
- The input string being parsed, an optional namespace prefix, followed
by the local name, if any. If a prefix is present, they are separated by a colon.arg1
- The namespace context is used to query mappings between prefixes and
namespace URI's.QName
.ParseConversionEvent
public Calendar parseDateTime(String arg0, boolean lenient)
Calendar
. Valid lexical representations of a dateTime value
include
YYYY-MM-DDThh:mm:ss YYYY-MM-DDThh:mm:ss.sss YYYY-MM-DDThh:mm:ssZ YYYY-MM-DDThh:mm:ss-01:00The former examples are all specified in UTC time. The last example uses a negative offset of one hour to UTC.
arg0
- The input string being parsed.lenient
- parameter used for allowing lenient parsingCalendar
.ParseConversionEvent
public Calendar parseDateTime(String arg0)
DatatypeConverterInterface
Calendar
. Valid lexical representations of a dateTime value
include
YYYY-MM-DDThh:mm:ss YYYY-MM-DDThh:mm:ss.sss YYYY-MM-DDThh:mm:ssZ YYYY-MM-DDThh:mm:ss-01:00The former examples are all specified in UTC time. The last example uses a negatice offset of one hour to UTC.
parseDateTime
in interface DatatypeConverterInterface
arg0
- The input string being parsed.Calendar
.ParseConversionEvent
public byte[] parseBase64Binary(String arg0)
DatatypeConverterInterface
parseBase64Binary
in interface DatatypeConverterInterface
arg0
- The input string being parsed, a base 64 encoded array of
bytes.ParseConversionEvent
public byte[] parseHexBinary(String arg0)
DatatypeConverterInterface
parseHexBinary
in interface DatatypeConverterInterface
arg0
- The input string being parsed, an array of bytes encoded in hex
digits.ParseConversionEvent
public long parseUnsignedInt(String arg0)
DatatypeConverterInterface
long
value.parseUnsignedInt
in interface DatatypeConverterInterface
arg0
- The input string being parsed.long
.ParseConversionEvent
public int parseUnsignedShort(String arg0)
DatatypeConverterInterface
int
value.parseUnsignedShort
in interface DatatypeConverterInterface
arg0
- The input string being parsed.int
.ParseConversionEvent
public Calendar parseTime(String arg0)
DatatypeConverterInterface
Calendar
. Valid lexical representations of a time value include
hh:mm:ss hh:mm:ss.sss hh:mm:ssZ hh:mm:ss-01:00The former examples are all specified in UTC time. The last example uses a negatice offset of one hour to UTC.
parseTime
in interface DatatypeConverterInterface
arg0
- The input string being parsed.Calendar
.ParseConversionEvent
public Calendar parseDate(String arg0)
DatatypeConverterInterface
Calendar
. Valid lexical representations of a date value include
YYYY-MM-DD YYYY-MM-DDZ YYYY-MM-DD-01:00The former examples are all specified in UTC time. The last example uses a negatice offset of one hour to UTC.
parseDate
in interface DatatypeConverterInterface
arg0
- The input string being parsed.Calendar
.ParseConversionEvent
public String parseAnySimpleType(String arg0)
DatatypeConverterInterface
parseAnySimpleType
in interface DatatypeConverterInterface
arg0
- An input string in lexical representation.ParseConversionEvent
public String printString(String arg0)
DatatypeConverterInterface
printString
in interface DatatypeConverterInterface
arg0
- The input string.PrintConversionEvent
public String printInteger(BigInteger arg0)
DatatypeConverterInterface
BigInteger
, which is an
integer in arbitrary precision.printInteger
in interface DatatypeConverterInterface
arg0
- The integer value being converted.PrintConversionEvent
public String printInt(int arg0)
DatatypeConverterInterface
printInt
in interface DatatypeConverterInterface
arg0
- The int
value being converted.PrintConversionEvent
public String printLong(long arg0)
DatatypeConverterInterface
printLong
in interface DatatypeConverterInterface
arg0
- The long
value being converted.PrintConversionEvent
public String printShort(short arg0)
DatatypeConverterInterface
printShort
in interface DatatypeConverterInterface
arg0
- The short
value being converted.PrintConversionEvent
public String printDecimal(BigDecimal arg0)
DatatypeConverterInterface
BigDecimal
, which is a
decimal number in arbitrary precision.printDecimal
in interface DatatypeConverterInterface
arg0
- The decimal value being converted.PrintConversionEvent
public String printFloat(float arg0)
DatatypeConverterInterface
printFloat
in interface DatatypeConverterInterface
arg0
- The float
value being converted.PrintConversionEvent
public String printDouble(double arg0)
DatatypeConverterInterface
printDouble
in interface DatatypeConverterInterface
arg0
- The double
value being converted.PrintConversionEvent
public String printBoolean(boolean arg0)
DatatypeConverterInterface
printBoolean
in interface DatatypeConverterInterface
arg0
- The boolean
value being converted.PrintConversionEvent
public String printByte(byte arg0)
DatatypeConverterInterface
printByte
in interface DatatypeConverterInterface
arg0
- The byte
value being converted.PrintConversionEvent
public String printQName(QName arg0, NamespaceContext arg1)
DatatypeConverterInterface
printQName
in interface DatatypeConverterInterface
arg0
- The qualified name being converted.arg1
- A mapping of prefixes to namespace URI's which may be used to
determine a valid prefix.PrintConversionEvent
public String printDateTime(Calendar arg0)
DatatypeConverterInterface
YYYY-MM-DDThh:mm:ss YYYY-MM-DDThh:mm:ss.sss YYYY-MM-DDThh:mm:ssZ YYYY-MM-DDThh:mm:ss-01:00The former examples are all specified in UTC time. The last example uses a negatice offset of one hour to UTC.
printDateTime
in interface DatatypeConverterInterface
arg0
- The dateTime value being convertedPrintConversionEvent
public String printBase64Binary(byte[] arg0)
DatatypeConverterInterface
printBase64Binary
in interface DatatypeConverterInterface
arg0
- The byte array being converted.PrintConversionEvent
public String printHexBinary(byte[] arg0)
DatatypeConverterInterface
printHexBinary
in interface DatatypeConverterInterface
arg0
- The byte array being converted.PrintConversionEvent
public String printUnsignedInt(long arg0)
DatatypeConverterInterface
printUnsignedInt
in interface DatatypeConverterInterface
arg0
- The long
value being converted.PrintConversionEvent
public String printUnsignedShort(int arg0)
DatatypeConverterInterface
printUnsignedShort
in interface DatatypeConverterInterface
arg0
- The short
value being converted.PrintConversionEvent
public String printTime(Calendar arg0)
DatatypeConverterInterface
hh:mm:ss hh:mm:ss.sss hh:mm:ssZ hh:mm:ss-01:00The former examples are all specified in UTC time. The last example uses a negatice offset of one hour to UTC.
printTime
in interface DatatypeConverterInterface
arg0
- The time value being convertedPrintConversionEvent
public String printDate(Calendar arg0)
DatatypeConverterInterface
YYYY-MM-DD YYYY-MM-DDZ YYYY-MM-DD-01:00The former examples are all specified in UTC time. The last example uses a negatice offset of one hour to UTC.
printDate
in interface DatatypeConverterInterface
arg0
- The date value being convertedPrintConversionEvent
public String printAnySimpleType(String arg0)
DatatypeConverterInterface
printAnySimpleType
in interface DatatypeConverterInterface
arg0
- The input string.PrintConversionEvent
Copyright © 1996–2023 Geotools. All rights reserved.