Class SourceFileFactory
java.lang.Object
org.wurbelizer.wurbel.SourceFileFactory
-
Method Summary
Modifier and TypeMethodDescriptionstatic intflushAll()Flushes all files and clears the cache.static voidDiscards all cached files, if any.static SourceFileOpens the file and loads it into memory.
If the file already has been loaded, it will be reused.static voidresetAll()Rewinds all output streams (makes them empty again).
-
Method Details
-
open
Opens the file and loads it into memory.
If the file already has been loaded, it will be reused.- Parameters:
filename- the filename- Returns:
- the open file
- Throws:
WurbelException- if reading the file did fail
-
initialize
public static void initialize()Discards all cached files, if any. -
resetAll
public static void resetAll()Rewinds all output streams (makes them empty again). -
flushAll
Flushes all files and clears the cache.- Returns:
- the number of updated files
- Throws:
WurbelException- if closing a file failed
-