F
- the source class of the conversion, i.e. the class of objects returned by the encapsulated extractorT
- the destination class of the conversion, i.e. the class of objects returned by this extractorpublic class ConvertorExtractor<F extends LocalAbstractObject,T extends LocalAbstractObject> extends java.lang.Object implements Extractor<T>
Constructor and Description |
---|
ConvertorExtractor(Extractor<? extends F> extractor,
Convertor<F,T> convertor)
|
Modifier and Type | Method and Description |
---|---|
T |
extract(ExtractorDataSource dataSource)
Extracts the
LocalAbstractObject from the specified binary data. |
java.lang.Class<? extends T> |
getExtractedClass()
Returns the object class extracted by this extractor.
|
public ConvertorExtractor(Extractor<? extends F> extractor, Convertor<F,T> convertor) throws java.lang.NullPointerException
Convertor
to the object extracted by the encapsulated Extractor
.extractor
- the encapsulated extractor that provides the objects to convertconvertor
- the convertor to apply to iterated itemsjava.lang.NullPointerException
- if the given extractor or convertor is nullpublic T extract(ExtractorDataSource dataSource) throws ExtractorException, java.io.IOException
Extractor
LocalAbstractObject
from the specified binary data.extract
in interface Extractor<T extends LocalAbstractObject>
dataSource
- the source of binary data for the extractionExtractorException
- if the extractor encountered problem
extracting the object from the binary datajava.io.IOException
- if there was a problem reading data from the dataSource
public java.lang.Class<? extends T> getExtractedClass()
Extractor
getExtractedClass
in interface Extractor<T extends LocalAbstractObject>