Interface DataProvider
-
- All Known Implementing Classes:
ByteArrayDataProvider
,CommandModelDataProvider
,StringDataProvider
@Contract public interface DataProvider
Provides ability to convert some instance intobyte[]
and back.
Implementations of this interface are located using standardServiceLoader
- Author:
- mmares
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
accept(Class clazz)
Object
toInstance(InputStream stream, Class clazz)
void
writeToStream(Object o, OutputStream stream)
-
-
-
Method Detail
-
accept
boolean accept(Class clazz)
-
writeToStream
void writeToStream(Object o, OutputStream stream) throws IOException
- Throws:
IOException
-
toInstance
Object toInstance(InputStream stream, Class clazz) throws IOException
- Throws:
IOException
-
-