| Modifier and Type | Field and Description |
|---|---|
static String |
PATH_SEPARATOR |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkHash(ILocator locator,
Object hash) |
static void |
checkHash(ILocator locator,
String algorithmName,
Object hash)
Deprecated.
|
static void |
copy(ILocator source,
ILocator target)
Copy locator content.
|
static ILocatorFactory |
createLocalLocatorFactory(Object context,
ILocatorFactory fallback)
Create a new
ILocatorFactory that will first try a lookup in the
local context object, with regard to IFileEnvironment and
IClassLoaderSupport, then in the fallback factory (if available). |
static ILocator |
createLocator(Object value,
ILocatorFactory factory,
ILocator defaultValue) |
static ILocator[] |
createLocators(String paths,
ILocatorFactory factory) |
static File |
createTempFile(ILocator locator)
A temporary
File with a copy of the data from "locator". |
static ILocator |
createTempLocator(ILocator locator)
A new temporary
ILocator with a copy of the data from "locator". |
static ILocator |
createTempLocator(ILocator locator,
boolean keepName)
A new temporary
ILocator with a copy of the data from "locator". |
static IDigest |
digest(ILocator locator,
IDigester digester) |
static IDigest |
digest(ILocator locator,
String algorithmName) |
static byte[] |
getBytes(ILocator locator)
The bytes referenced by "locator".
|
static File |
getFile(ILocator locator) |
static String |
getString(ILocator locator)
The
String data referenced by "locator". |
static String |
getString(ILocator locator,
String defaultCharsetName,
int size)
The
String data referenced by "locator". |
static void |
putBytes(ILocator locator,
byte[] bytes)
Write bytes to locator.
|
static void |
putString(ILocator locator,
String string)
Write string to locator.
|
static void |
save(ILocator locator,
File file)
Save "locator"s content to a file.
|
public static final String PATH_SEPARATOR
public static void checkHash(ILocator locator, Object hash) throws IOException
IOException@Deprecated public static void checkHash(ILocator locator, String algorithmName, Object hash) throws IOException
IOExceptionpublic static void copy(ILocator source, ILocator target) throws IOException
source - target - IOExceptionpublic static ILocatorFactory createLocalLocatorFactory(Object context, ILocatorFactory fallback)
ILocatorFactory that will first try a lookup in the
local context object, with regard to IFileEnvironment and
IClassLoaderSupport, then in the fallback factory (if available).
The ILocatorFactory does not statically work on the context
values at the moment of invocation of this method, but creates an
indirection to the context.context - fallback - public static ILocator createLocator(Object value, ILocatorFactory factory, ILocator defaultValue)
public static ILocator[] createLocators(String paths, ILocatorFactory factory) throws IOException
IOExceptionpublic static File createTempFile(ILocator locator) throws IOException
File with a copy of the data from "locator".locator - IOExceptionpublic static ILocator createTempLocator(ILocator locator) throws IOException
ILocator with a copy of the data from "locator".
The ILocator and the data backing store created is guaranteed to
live as long as it is used (not garbage collected). Best effort is made
to delete all artifacts after it is no longer used.locator - ILocatorIOExceptionpublic static ILocator createTempLocator(ILocator locator, boolean keepName) throws IOException
ILocator with a copy of the data from "locator".
The ILocator and the data backing store created is guaranteed to
live as long as it is used (not garbage collected). Best effort is made
to delete all artifacts after it is no longer used.locator - keepName - Flag if the resulting locator should have the same name as the
original input.ILocatorIOExceptionpublic static IDigest digest(ILocator locator, IDigester digester) throws IOException
IOExceptionpublic static IDigest digest(ILocator locator, String algorithmName) throws IOException
IOExceptionpublic static byte[] getBytes(ILocator locator) throws IOException
locator - IOExceptionpublic static File getFile(ILocator locator) throws IOException
IOExceptionpublic static String getString(ILocator locator) throws IOException
String data referenced by "locator". If necessary, the
encoding associated with the locator is used by using its "getReader"
method.locator - String data referenced by "locator".IOExceptionpublic static String getString(ILocator locator, String defaultCharsetName, int size) throws IOException
String data referenced by "locator". The encoding is derived
from the InputStream or defaulted to the charset declared by the
ILocator or the parameter defaultCharsetName.locator - defaultCharsetName - String data referenced by "locator".IOExceptionpublic static void putBytes(ILocator locator, byte[] bytes) throws IOException
IOExceptionpublic static void putString(ILocator locator, String string) throws IOException
IOExceptionpublic static void save(ILocator locator, File file) throws IOException
locator - file - IOExceptionCopyright © 2013 intarsys consulting GmbH. All Rights Reserved.