Package io.microsphere.convert
Class ByteArrayToObjectConverter
- java.lang.Object
-
- io.microsphere.convert.AbstractConverter<byte[],java.lang.Object>
-
- io.microsphere.convert.ByteArrayToObjectConverter
-
- All Implemented Interfaces:
Converter<byte[],java.lang.Object>
,Prioritized
,java.lang.Comparable<Prioritized>
public class ByteArrayToObjectConverter extends AbstractConverter<byte[],java.lang.Object>
The class coverts thebyte array
object to be aObject
instance .- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
Serializable
-
-
Field Summary
Fields Modifier and Type Field Description static ByteArrayToObjectConverter
INSTANCE
The Singleton instance ofByteArrayToObjectConverter
-
Fields inherited from class io.microsphere.convert.AbstractConverter
logger
-
Fields inherited from interface io.microsphere.lang.Prioritized
COMPARATOR, MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description ByteArrayToObjectConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.Serializable
doConvert(byte[] source)
Converts the non-null source-typed value to the target-typed value.-
Methods inherited from class io.microsphere.convert.AbstractConverter
convert, equals, getPriority, hashCode, resolvePriority
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.microsphere.convert.Converter
accept, getSourceType, getTargetType
-
Methods inherited from interface io.microsphere.lang.Prioritized
compareTo
-
-
-
-
Field Detail
-
INSTANCE
public static final ByteArrayToObjectConverter INSTANCE
The Singleton instance ofByteArrayToObjectConverter
-
-
Method Detail
-
doConvert
public java.io.Serializable doConvert(byte[] source)
Description copied from class:AbstractConverter
Converts the non-null source-typed value to the target-typed value.This method is called by
AbstractConverter.convert(Object)
after checking if the source is null. Subclasses must implement this method to provide the actual conversion logic.- Specified by:
doConvert
in classAbstractConverter<byte[],java.lang.Object>
- Parameters:
source
- the non-null source-typed value- Returns:
- the converted target-typed value, or
null
if conversion is not possible
-
-