|
Gridarta Editor
|
Utility-class for Gridarta's I/O. More...
Collaboration diagram for net.sf.gridarta.utils.IOUtils:Static Public Member Functions | |
| static File | findPathFile (@NotNull final String name) throws IOException |
| Searches for. More... | |
| static File | getCanonicalFile (@NotNull final File file) |
| Calls File#getCanonicalFile(). More... | |
| static String | getCanonicalPath (@NotNull final File file) |
| Calls File#getCanonicalPath(). More... | |
| static File | getFile (@Nullable final File dir, @NotNull final String fileName) throws IOException |
| Returns a File instance for a resource that is a regular file on the file system. More... | |
| static URL | getResource (@Nullable final File dir, @NotNull final String fileName) throws FileNotFoundException |
| Get the URL of a resource. More... | |
Static Public Attributes | |
| static final String | MAP_ENCODING = "iso-8859-1" |
| Encoding to use for maps and other data. More... | |
Private Member Functions | |
| IOUtils () | |
| Utility class - do not instantiate. More... | |
Utility-class for Gridarta's I/O.
Definition at line 40 of file IOUtils.java.
|
private |
Utility class - do not instantiate.
Definition at line 56 of file IOUtils.java.
|
static |
Searches for.
on all paths specified by the environment variable "PATH".
| name | the file to search for |
| IOException | if the file was not found |
Definition at line 162 of file IOUtils.java.
Here is the caller graph for this function:
|
static |
Calls File#getCanonicalFile().
If this fails, returns File#getAbsoluteFile().
| file | the file |
Definition at line 208 of file IOUtils.java.
Referenced by net.sf.gridarta.model.settings.AbstractDefaultProjectSettings.AbstractDefaultProjectSettings(), net.sf.gridarta.model.settings.AbstractDefaultProjectSettings.setArchDirectory(), net.sf.gridarta.model.settings.AbstractDefaultProjectSettings.setMapsDirectoryInt(), and net.sf.gridarta.model.settings.AbstractDefaultProjectSettings.setMediaDirectory().
Here is the caller graph for this function:
|
static |
Calls File#getCanonicalPath().
If this fails, returns File#getAbsolutePath().
| file | the file |
Definition at line 191 of file IOUtils.java.
Referenced by net.sf.gridarta.model.io.PathManager.getMapFile().
Here is the caller graph for this function:
|
static |
Returns a File instance for a resource that is a regular file on the file system.
Returns the passed file if it is a regular file. Otherwise copies the passed file into a temporary regular file and returns the copy.
| dir | directory to read from |
| fileName | file name of file to read |
| IOException | if the file does not exist or cannot be copied to the file system |
Definition at line 124 of file IOUtils.java.
References net.sf.gridarta.utils.IOUtils.getResource().
Referenced by net.sf.gridarta.model.configsource.AbstractConfigSource.getFile(), and net.sf.gridarta.model.face.DefaultFaceObjects.loadFacesCollection().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Get the URL of a resource.
| dir | the directory to read from |
| fileName | the file name of the file to read |
| FileNotFoundException | in case all tries getting a URL to the file failed |
Definition at line 68 of file IOUtils.java.
Referenced by net.sf.gridarta.utils.IOUtils.getFile(), net.sf.gridarta.model.resource.AbstractCollectedResourcesReader< GameObject, MapArchObject, Archetype >.loadAnimations(), net.sf.gridarta.model.resource.AbstractResourcesReader< G >.loadAnimationsFromCollect(), net.sf.gridarta.model.resource.AbstractCollectedResourcesReader< GameObject, MapArchObject, Archetype >.loadArchetypes(), net.sf.gridarta.project.ProjectModel<?, ?, ?>.loadArchetypeTypeSet(), net.sf.gridarta.model.face.DefaultFaceObjects.loadFacesCollection(), net.sf.gridarta.project.ProjectModel<?, ?, ?>.loadGameObjectMatchers(), net.sf.gridarta.var.crossfire.resource.CollectedResourcesReader.loadSmoothFaces(), net.sf.gridarta.project.ProjectModel<?, ?, ?>.loadSpecialTreasureLists(), net.sf.gridarta.project.ProjectModel<?, ?, ?>.loadSpellFile(), net.sf.gridarta.var.daimonin.maincontrol.DefaultEditorFactory.newArchetypeParser(), and net.sf.gridarta.var.atrinik.maincontrol.DefaultEditorFactory.newArchetypeParser().
Here is the caller graph for this function:
|
static |
Encoding to use for maps and other data.
The encoding given here is used for reading and writing maps. You shouldn't change this only because you use an UTF-8 system or so, since the encoding used here MUST be compatible with the server and the client and the maps. The paragraph sign § is the critical character.
Definition at line 51 of file IOUtils.java.
Referenced by net.sf.gridarta.model.collectable.SmoothFacesCollectable.collect(), net.sf.gridarta.model.collectable.AbstractArchetypeSetCollectable< GameObject, MapArchObject, Archetype >.collect(), net.sf.gridarta.model.collectable.AnimationObjectsCollectable.collectAnimations(), net.sf.gridarta.model.collectable.AnimationObjectsCollectable.collectAnimTree(), net.sf.gridarta.model.io.DefaultMapReader< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.DefaultMapReader(), net.sf.gridarta.model.mapcontrol.DefaultMapControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.encodeMapFile(), net.sf.gridarta.model.validation.checks.MapCheckerScriptChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getCommand(), net.sf.gridarta.model.smoothface.SmoothFacesLoader.load(), net.sf.gridarta.model.gameobject.MultiPositionData.load(), net.sf.gridarta.model.io.AnimationObjectsReader.loadAnimations(), net.sf.gridarta.model.resource.AbstractResourcesReader< G >.loadAnimationsFromCollect(), net.sf.gridarta.model.resource.AbstractResourcesReader< G >.loadAnimTree(), net.sf.gridarta.model.resource.AbstractCollectedResourcesReader< GameObject, MapArchObject, Archetype >.loadArchetypes(), net.sf.gridarta.model.face.DefaultFaceObjects.loadFacesCollection(), net.sf.gridarta.model.treasurelist.TreasureLoader.loadTreasureList(), and net.sf.gridarta.textedit.scripteditor.MenuEntries.MenuEntries().