Package VASSAL.launch
Class TilingHandler
java.lang.Object
VASSAL.launch.TilingHandler
public class TilingHandler extends Object
A launcher for the process which tiles large images.
- Since:
- 3.2.0
- Author:
- Joel Uckelman
-
Field Summary
-
Constructor Summary
Constructors Constructor Description TilingHandler(String aname, File cdir, Dimension tdim, int mhlim, int pid)Creates aTilingHandler. -
Method Summary
Modifier and Type Method Description protected voidcleanup()protected Pair<Integer,Integer>findImages(DataArchive archive, FileStore tcache, List<String> multi, List<Pair<String,IOException>> failed)protected DimensiongetImageSize(DataArchive archive, String ipath)protected booleanisFresh(FileArchive archive, FileStore tcache, String ipath)protected voidmakeHashDirs()protected voidrunSlicer(List<String> multi, int tcount, int maxheap)voidsliceTiles()Slices the tiles.
-
Field Details
-
aname
-
cdir
-
tdim
-
maxheap_limit
protected final int maxheap_limit -
pid
protected final int pid
-
-
Constructor Details
-
TilingHandler
Creates aTilingHandler.- Parameters:
aname- the path to the ZIP archivecdir- the tile cache diretorytdim- the tile sizepid- the id of the child process
-
-
Method Details
-
isFresh
- Throws:
IOException
-
getImageSize
- Throws:
IOException
-
findImages
protected Pair<Integer,Integer> findImages(DataArchive archive, FileStore tcache, List<String> multi, List<Pair<String,IOException>> failed) throws IOException- Throws:
IOException
-
runSlicer
protected void runSlicer(List<String> multi, int tcount, int maxheap) throws CancellationException, IOException- Throws:
CancellationExceptionIOException
-
makeHashDirs
- Throws:
IOException
-
cleanup
- Throws:
IOException
-
sliceTiles
Slices the tiles.- Throws:
IOException- if one occursCancellationException
-