Package com.gengoai.io.resource.spi
Class ByteArrayResourceProvider
- java.lang.Object
-
- com.gengoai.io.resource.spi.ByteArrayResourceProvider
-
- All Implemented Interfaces:
ResourceProvider
@MetaInfServices public class ByteArrayResourceProvider extends Object implements ResourceProvider
A provider for byte array backed resources.- Author:
- David B. Bracewell
-
-
Constructor Summary
Constructors Constructor Description ByteArrayResourceProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Resource
createResource(String specification, Map<String,String> properties)
Creates a resource with the given specification and properties using aBeanMap
.String[]
getProtocols()
boolean
requiresProtocol()
-
-
-
Field Detail
-
SCHEME
public static final String SCHEME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getProtocols
public String[] getProtocols()
- Specified by:
getProtocols
in interfaceResourceProvider
- Returns:
- The protocols that this provider supports (e.g. http, file, string, etc.)
-
createResource
public Resource createResource(String specification, Map<String,String> properties)
Description copied from interface:ResourceProvider
Creates a resource with the given specification and properties using aBeanMap
.- Specified by:
createResource
in interfaceResourceProvider
- Parameters:
specification
- The specificationproperties
- The properties- Returns:
- A resource
-
requiresProtocol
public boolean requiresProtocol()
- Specified by:
requiresProtocol
in interfaceResourceProvider
- Returns:
- True if the SCHEME is required as part of the specification
-
-