Package net.simplace.sim.io
Klasse FilePool
java.lang.Object
net.simplace.sim.io.FilePool
Has to be finalized before quitting the application
Reads from file system, out of zip-file and from class path or normal file access.
Can be used to efficiently access XML-files via Element (getRootElement) or CSV-Files via (getLinesOfFiles)
UpdateFileName will reset the caches only if the file name was changed in between. Read {
updateFileName(String, FWSimVarMap)
for more information.
The data will be cached for a second use. For memory optimization make sure to finalize the object accordingly- Autor:
- Andreas Enders
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungFilePool(String aFileName, String aContent, FWSimSession aCurrentSession, String aDivider, int aPoolSize, FWSimVariable.CONTENT_TYPE aContent_Type) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidfinalize()closes the file if content type is out and there is no more access to the filebooleanregisterFile(FWSimVarMap aVarMap) toString()
-
Konstruktordetails
-
FilePool
public FilePool(String aFileName, String aContent, FWSimSession aCurrentSession, String aDivider, int aPoolSize, FWSimVariable.CONTENT_TYPE aContent_Type) - Parameter:
aFileName-aCurrentSession-aDivider-aPoolSize-aContent_Type-
-
-
Methodendetails
-
registerFile
- Parameter:
aVarMap-- Gibt zurück:
- the registered file data
-
getContentType
- Gibt zurück:
- type of content from
FWSimVariable.CONTENT_TYPE
-
finalize
public void finalize()closes the file if content type is out and there is no more access to the file -
toString
-
isInitialized
public boolean isInitialized()- Gibt zurück:
- check if Fileinfo is readily usable
-