|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.esdihumboldt.hale.common.core.io.HaleIO
public abstract class HaleIO
Hale I/O utilities
Constructor Summary | |
---|---|
HaleIO()
|
Method Summary | ||
---|---|---|
static
|
createIOProvider(Class<P> providerType,
org.eclipse.core.runtime.content.IContentType contentType,
String providerId)
Creates an I/O provider instance |
|
static List<IOProviderDescriptor> |
filterFactories(Collection<IOProviderDescriptor> factories,
org.eclipse.core.runtime.content.IContentType contentType)
Filter I/O provider factories by content type |
|
static
|
findContentType(Class<P> providerType,
com.google.common.io.InputSupplier<? extends InputStream> in,
String filename)
Find the content type for the given input |
|
static List<org.eclipse.core.runtime.content.IContentType> |
findContentTypesFor(Collection<org.eclipse.core.runtime.content.IContentType> types,
com.google.common.io.InputSupplier<? extends InputStream> in,
String filename)
Find the content types that match the given file name and/or input. |
|
static
|
findImportProvider(Class<T> type,
InputStream in)
Automatically find an import provider to load a resource that is available through an input stream that can only be read once. |
|
static
|
findIOProvider(Class<P> providerType,
com.google.common.io.InputSupplier<? extends InputStream> in,
String filename)
Find an I/O provider instance for the given input |
|
static
|
findIOProviderFactory(Class<P> providerType,
org.eclipse.core.runtime.content.IContentType contentType,
String providerId)
Find an I/O provider factory |
|
static
|
getProviderFactories(Class<P> providerType)
Get the I/O provider factories of a certain type |
|
static boolean |
isCompatibleContentType(org.eclipse.core.runtime.content.IContentType parentType,
org.eclipse.core.runtime.content.IContentType valueType)
Test if the given value content type is compatible with the given parent content type |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HaleIO()
Method Detail |
---|
public static List<IOProviderDescriptor> filterFactories(Collection<IOProviderDescriptor> factories, org.eclipse.core.runtime.content.IContentType contentType)
factories
- the I/O provider factoriescontentType
- the content type factories must support
public static List<org.eclipse.core.runtime.content.IContentType> findContentTypesFor(Collection<org.eclipse.core.runtime.content.IContentType> types, com.google.common.io.InputSupplier<? extends InputStream> in, String filename)
types
- the types to matchin
- the input supplier to use for testing, may be null
if the file name is not null
filename
- the file name, may be null
if the input
supplier is not null
public static <P extends IOProvider> Collection<IOProviderDescriptor> getProviderFactories(Class<P> providerType)
providerType
- the provider type, usually an interface
public static <P extends IOProvider> IOProviderDescriptor findIOProviderFactory(Class<P> providerType, org.eclipse.core.runtime.content.IContentType contentType, String providerId)
P
- the provider interface typeproviderType
- the provider type, usually an interfacecontentType
- the content type the provider must match, may be
null
if providerId is setproviderId
- the id of the provider to use, may be null
if contentType is set
null
if no matching I/O
provider factory is foundpublic static <P extends IOProvider> P createIOProvider(Class<P> providerType, org.eclipse.core.runtime.content.IContentType contentType, String providerId)
P
- the provider interface typeproviderType
- the provider type, usually an interfacecontentType
- the content type the provider must match, may be
null
if providerId is setproviderId
- the id of the provider to use, may be null
if contentType is set
null
if no matching I/O provider is foundpublic static <P extends IOProvider> org.eclipse.core.runtime.content.IContentType findContentType(Class<P> providerType, com.google.common.io.InputSupplier<? extends InputStream> in, String filename)
P
- the provider interface typeproviderType
- the provider type, usually an interfacein
- the input supplier to use for testing, may be null
if the file name is not null
filename
- the file name, may be null
if the input
supplier is not null
null
if no matching content type
is foundpublic static <P extends IOProvider> P findIOProvider(Class<P> providerType, com.google.common.io.InputSupplier<? extends InputStream> in, String filename)
P
- the provider interface typeproviderType
- the provider type, usually an interfacein
- the input supplier to use for testing, may be null
if the file name is not null
filename
- the file name, may be null
if the input
supplier is not null
null
if no matching I/O provider
is foundpublic static <T extends ImportProvider> T findImportProvider(Class<T> type, InputStream in)
type
- the import provider typein
- the input stream
null
if none was foundpublic static boolean isCompatibleContentType(org.eclipse.core.runtime.content.IContentType parentType, org.eclipse.core.runtime.content.IContentType valueType)
parentType
- the parent content typevalueType
- the value content type
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |