Package org.beanio.types
Class URLTypeHandler
- java.lang.Object
-
- org.beanio.types.URLTypeHandler
-
- All Implemented Interfaces:
TypeHandler
public class URLTypeHandler extends java.lang.Object implements TypeHandler
A type handler forURLvalues.- Since:
- 2.0
-
-
Field Summary
-
Fields inherited from interface org.beanio.types.TypeHandler
NIL
-
-
Constructor Summary
Constructors Constructor Description URLTypeHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringformat(java.lang.Object value)Formats aURLby callingtoString().java.lang.Class<?>getType()ReturnsURL.java.lang.Objectparse(java.lang.String text)Parses aURLusing its constructorURL(String).
-
-
-
Method Detail
-
parse
public java.lang.Object parse(java.lang.String text) throws TypeConversionExceptionParses aURLusing its constructorURL(String).- Specified by:
parsein interfaceTypeHandler- Parameters:
text- the text to parse- Returns:
- the parsed
URLor null iftextis null or an empty string - Throws:
TypeConversionException- if the text cannot be parsed
-
format
public java.lang.String format(java.lang.Object value)
Formats aURLby callingtoString(). Ifvalueis null,nullis returned.- Specified by:
formatin interfaceTypeHandler- Parameters:
value- theURLto format- Returns:
- the formatted text
-
getType
public java.lang.Class<?> getType()
ReturnsURL.- Specified by:
getTypein interfaceTypeHandler- Returns:
- the class type supported by this handler
-
-