public final class ImporterManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TAG |
Modifier and Type | Method and Description |
---|---|
static Importer |
findImporter(java.lang.String contentType,
java.lang.String mime)
Returns an importer for a specific content and mime type.
|
static java.util.Set<Importer> |
findImporters(java.lang.String supportedMimeType)
Find a set of importers that support a given mime type
|
static CommsMapComponent.ImportResult |
importData(CotEvent event,
android.os.Bundle bundle)
Given a CotEvent and a bundle, attempt to import the data.
|
static CommsMapComponent.ImportResult |
importData(java.io.InputStream in,
android.os.Bundle bundle)
Given an inputStream and a bundle, attempt to determine the content type and mime type
for the stream, then call importData.
|
static CommsMapComponent.ImportResult |
importData(java.io.InputStream source,
java.lang.String contentType,
java.lang.String mime,
android.os.Bundle bundle)
Given an inputStream, content type, mime type, and bundle, attempt to find a
valid importer for the inputStream and if found, import the data into the system.
|
static void |
registerImporter(Importer importer)
Register an importer for use when importing data
|
static void |
unregisterImporter(Importer importer)
Unregister an importer for use when importing data
|
public static void registerImporter(Importer importer)
importer
- the importerpublic static void unregisterImporter(Importer importer)
importer
- the importerpublic static Importer findImporter(java.lang.String contentType, java.lang.String mime)
contentType
- the content type to usemime
- the mime type to usepublic static java.util.Set<Importer> findImporters(java.lang.String supportedMimeType)
supportedMimeType
- the mime typepublic static CommsMapComponent.ImportResult importData(java.io.InputStream in, android.os.Bundle bundle) throws java.io.IOException
in
- the input stream be be used with a maximal probe size of 64kb or lessbundle
- the bundle that could contain extra informationjava.io.IOException
public static CommsMapComponent.ImportResult importData(CotEvent event, android.os.Bundle bundle) throws java.io.IOException
java.io.IOException
public static CommsMapComponent.ImportResult importData(java.io.InputStream source, java.lang.String contentType, java.lang.String mime, android.os.Bundle bundle) throws java.io.IOException
java.io.IOException