public class StreamManager extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
logAllLookups |
| Constructor and Description |
|---|
StreamManager()
Create a
StreamManager with no locator or location mapper. |
| Modifier and Type | Method and Description |
|---|---|
StreamManager |
addLocator(Locator loc)
Add a locator to the end of the locators list.
|
void |
clearLocators()
Remove all locators
|
StreamManager |
clone()
Create a deep copy of this StreamManager
|
static StreamManager |
createStd()
Return a default configuration StreamManager with a
LocatorFile,
LocatorHTTP, LocatorFTP and LocatorClassLoader |
static StreamManager |
get()
Return the global
StreamManager. |
static StreamManager |
get(Context context)
Return the
StreamManager in a context, or the global one if the context is
null or does not contain a valid entry for a StreamManager. |
LocationMapper |
getLocationMapper()
Get the location mapping
|
boolean |
hasMapping(String filenameOrURI)
Test whether a mapping exists
|
List<Locator> |
locators()
Return an immutable list of all the handlers
|
static StreamManager |
makeDefaultStreamManager()
Deprecated.
|
String |
mapURI(String filenameOrURI)
Apply the mapping of a filename or URI
|
TypedInputStream |
open(String filenameOrURI)
Open a file using the locators of this StreamManager.
|
TypedInputStream |
openNoMap(String filenameOrURI)
Open a file using the locators of this StreamManager but without location
mapping.
|
TypedInputStream |
openNoMapOrNull(String filenameOrURI)
Open a file using the locators of this StreamManager without location
mapping.
|
void |
remove(Locator loc)
Remove a locator.
|
static void |
setGlobal(StreamManager streamManager)
Set the global
StreamManager. |
void |
setLocationMapper(LocationMapper _mapper)
Set the location mapping
|
public StreamManager()
StreamManager with no locator or location mapper.public static StreamManager createStd()
LocatorFile,
LocatorHTTP, LocatorFTP and LocatorClassLoader@Deprecated public static StreamManager makeDefaultStreamManager()
public static StreamManager get()
StreamManager.public static StreamManager get(Context context)
StreamManager in a context, or the global one if the context is
null or does not contain a valid entry for a StreamManager.
The StreamManager is keyed in the context by
SysRIOT.sysStreamManager.
public static void setGlobal(StreamManager streamManager)
StreamManager.public StreamManager clone()
public TypedInputStream open(String filenameOrURI)
public boolean hasMapping(String filenameOrURI)
public TypedInputStream openNoMap(String filenameOrURI)
public TypedInputStream openNoMapOrNull(String filenameOrURI)
public void setLocationMapper(LocationMapper _mapper)
public LocationMapper getLocationMapper()
public void remove(Locator loc)
public void clearLocators()
public StreamManager addLocator(Locator loc)
this StreamManager.Licenced under the Apache License, Version 2.0