
public class MetaclassBase extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
MetaclassBase.TemporaryFileSet
A subclass of
LinkedHashSet that holds temporary files and doubles as a deletion hook. |
| Modifier and Type | Field and Description |
|---|---|
protected static int |
BULK_TRANSFER_SIZE
The bulk transfer size for
InputStreams and OutputStreams. |
protected static Map<ResourceRegistry,MetaclassBase.TemporaryFileSet> |
rrToTfsMap
A weak mapping from
ResourceRegistrys to MetaclassBase.TemporaryFileSets. |
protected static Set<MetaclassBase.TemporaryFileSet> |
tfss
A weak set of
MetaclassBase.TemporaryFileSets. |
| Modifier and Type | Method and Description |
|---|---|
static void |
close(Closeable closeable)
A
Closeable.close() convenience wrapper. |
static byte[] |
getBytes(InputStream in)
Gets a
byte array from the given stream. |
static URL |
getResourceAsTemporaryFile(ResourceRegistry registry,
String pathname)
Gets a resource from the given registry as a temporary file.
|
static void |
transfer(InputStream in,
OutputStream out)
Transfers the contents of one stream into another.
|
protected static final int BULK_TRANSFER_SIZE
InputStreams and OutputStreams.protected static final Map<ResourceRegistry,MetaclassBase.TemporaryFileSet> rrToTfsMap
ResourceRegistrys to MetaclassBase.TemporaryFileSets.protected static final Set<MetaclassBase.TemporaryFileSet> tfss
MetaclassBase.TemporaryFileSets.public static final void close(Closeable closeable)
Closeable.close() convenience wrapper.public static final void transfer(InputStream in, OutputStream out) throws IOException
in - the InputStream.out - the OutputStream.IOException - when something goes awry.public static final byte[] getBytes(InputStream in) throws IOException
byte array from the given stream.in - the InputStream.byte array.IOException - when something goes awry.public static final URL getResourceAsTemporaryFile(ResourceRegistry registry, String pathname)