Top Fields Constructors Methods
io.vertx.core.file.impl

pack-priv Class FileCache

extends Object
Class Inheritance
Imports
io.vertx.core.VertxException, io.vertx.core.impl.Utils, java.io.File, .IOException, .InputStream, java.nio.file.FileAlreadyExistsException, .Files, .Path, .StandardCopyOption, java.nio.file.attribute.PosixFilePermission, .PosixFilePermissions, java.util.Set, .UUID

Field Summary

Modifier and TypeField and Description
private File
private Thread

Constructor Summary

AccessConstructor and Description
public
FileCache(File cacheDir)

Method Summary

Modifier and TypeMethod and Description
pack-priv String
pack-priv void
cacheDir(String fileName)

pack-priv File
cacheFile(String fileName, File resource, boolean overwrite)

pack-priv void
cacheFile(String fileName, InputStream is, boolean overwrite)

pack-priv void
private void
private void
private File
pack-priv File
pack-priv File
getFile(String fileName)

pack-priv synchronized void
pack-priv String
relativize(String fileName)

private void
pack-priv static FileCache
setupCache(String fileCacheDir)

pack-priv static File
setupCacheDir(String fileCacheDir)

Prepares the cache directory to be used in the application.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheDirback to summary
private File cacheDir
shutdownHookback to summary
private Thread shutdownHook

Constructor Detail

FileCacheback to summary
public FileCache(File cacheDir)

Method Detail

cacheDirback to summary
pack-priv String cacheDir()
cacheDirback to summary
pack-priv void cacheDir(String fileName) throws IOException
cacheFileback to summary
pack-priv File cacheFile(String fileName, File resource, boolean overwrite) throws IOException
cacheFileback to summary
pack-priv void cacheFile(String fileName, InputStream is, boolean overwrite) throws IOException
closeback to summary
pack-priv void close() throws IOException
deleteCacheDirback to summary
private void deleteCacheDir() throws IOException
fileNameCheckback to summary
private void fileNameCheck(File file) throws IOException
getCacheDirback to summary
private File getCacheDir()
getCanonicalFileback to summary
pack-priv File getCanonicalFile(File file)
getFileback to summary
pack-priv File getFile(String fileName)
registerShutdownHookback to summary
pack-priv synchronized void registerShutdownHook()
relativizeback to summary
pack-priv String relativize(String fileName)
runHookback to summary
private void runHook()
setupCacheback to summary
pack-priv static FileCache setupCache(String fileCacheDir)
setupCacheDirback to summary
pack-priv static File setupCacheDir(String fileCacheDir)

Prepares the cache directory to be used in the application.