51Degrees Pipeline for Java

fiftyone.pipeline.engines.data.JsonLoader< T > Class Template Reference

Detailed Description

JSON implementation of IDataLoader.

This deserialises the data from a JSON file to the type T.

Parameters
<T>type of object to load

Inheritance diagram for fiftyone.pipeline.engines.data.JsonLoader< T >:

[legend]

Collaboration diagram for fiftyone.pipeline.engines.data.JsonLoader< T >:

[legend]

Public Member Functions

loadData (String filePath, Class< T > type) throws IOException, IllegalAccessException, InvocationTargetException, InstantiationException
 Load a new instance of T using the data in the file provided.
loadData (byte[] data, Class< T > type) throws IOException, IllegalAccessException, InvocationTargetException, InstantiationException
 Load a new instance of T using the data in the byte array provided.

Member Function Documentation

◆ loadData() [1/2]

T fiftyone.pipeline.engines.data.JsonLoader< T >.loadData ( byte[] data,
Class< T > type ) throws IOException, IllegalAccessException, InvocationTargetException, InstantiationException

Load a new instance of T using the data in the byte array provided.

Parameters
databyte array to load from
typethe type of object to load
Returns
new instance of T
Exceptions
IOExceptionif there was a problem reading or writing
IllegalAccessExceptionif there was a problem accessing memory
InvocationTargetExceptionif there was a reflection based problem in the implementation
InstantiationExceptionif an instance of T could not be created

Implements fiftyone.pipeline.engines.data.DataLoader< T >.

◆ loadData() [2/2]

T fiftyone.pipeline.engines.data.JsonLoader< T >.loadData ( String filePath,
Class< T > type ) throws IOException, IllegalAccessException, InvocationTargetException, InstantiationException

Load a new instance of T using the data in the file provided.

Parameters
filePathfile to load from
typethe type of object to load
Returns
new instance of T
Exceptions
IOExceptionif there was a problem reading or writing
IllegalAccessExceptionif there was a problem accessing memory
InvocationTargetExceptionif there was a reflection based problem in the implementation
InstantiationExceptionif an instance of T could not be created

Implements fiftyone.pipeline.engines.data.DataLoader< T >.