|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.intarsys.tools.locator.LocatorTools
public class LocatorTools
Tool methods for dealing with ILocator.
| Field Summary | |
|---|---|
static String |
PATH_SEPARATOR
|
| Method Summary | |
|---|---|
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 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,
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 |
save(ILocator locator,
File file)
Save "locator"s content to a file. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PATH_SEPARATOR
| Method Detail |
|---|
public static void checkHash(ILocator locator,
Object hash)
throws IOException
IOException
@Deprecated
public static void checkHash(ILocator locator,
String algorithmName,
Object hash)
throws IOException
IOException
public static void copy(ILocator source,
ILocator target)
throws IOException
source - target -
IOException
public static ILocator createLocator(Object value,
ILocatorFactory factory,
ILocator defaultValue)
public static ILocator[] createLocators(String paths,
ILocatorFactory factory)
throws IOException
IOException
public static File createTempFile(ILocator locator)
throws IOException
File with a copy of the data from "locator".
locator -
IOException
public 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 -
ILocator
IOException
public 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.
ILocator
IOException
public static IDigest digest(ILocator locator,
String algorithmName)
throws IOException
IOException
public static byte[] getBytes(ILocator locator)
throws IOException
locator -
IOException
public static File getFile(ILocator locator)
throws IOException
IOException
public 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".
IOException
public 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".
IOException
public static void putBytes(ILocator locator,
byte[] bytes)
throws IOException
IOException
public static void save(ILocator locator,
File file)
throws IOException
locator - file -
IOException
|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||