org.joda.convert.factory
Class ByteObjectArrayStringConverterFactory

java.lang.Object
  extended by org.joda.convert.factory.ByteObjectArrayStringConverterFactory
All Implemented Interfaces:
StringConverterFactory

public final class ByteObjectArrayStringConverterFactory
extends Object
implements StringConverterFactory

Factory for StringConverter providing support for Byte object array as a sequence of two letter hex codes for each byte plus '--' for null.

This is intended as a human readable format, not a compact format.

To use, simply register the instance with a StringConvert instance.

This class is immutable and thread-safe.

Since:
1.5

Field Summary
static StringConverterFactory INSTANCE
          Singleton instance.
 
Method Summary
 StringConverter<?> findConverter(Class<?> cls)
          Finds a converter by type.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final StringConverterFactory INSTANCE
Singleton instance.

Method Detail

findConverter

public StringConverter<?> findConverter(Class<?> cls)
Finds a converter by type.

Specified by:
findConverter in interface StringConverterFactory
Parameters:
cls - the type to lookup, not null
Returns:
the converter, null if not found
Throws:
RuntimeException - (or subclass) if source code is invalid

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010–2014 Joda.org. All rights reserved.