public interface ILcdInputStreamFactory
InputStreamfrom a given source.
This can be used in implementations of
to implement, e.g., ways of securely transferring data from the actual source to the actual decoder.
|Modifier and Type||Method and Description|
Checks whether this input stream factory can provide access to
default boolean canCreateInputStream(String aSource)
aSource. It is acceptable for this method to return
truefor a source while
createInputStreamthrows an exception for that same source.
For performance reasons, we strongly recommend that implementations perform only a simple test.
For example: check the structure of
aSource to see if it is a URI with a specific scheme, but do not verify
aSource really is accessible.
The default implementation of this method returns
Make sure to override this method if you can easily reject sources. This can help avoid pointless invocations of
createInputStream which would have to throw exceptions for unsupported sources.
aSource- the data source to be verified; typically a file name or a URL.
trueif this input stream factory can likely access the source,
InputStream createInputStream(String aSource) throws IOException