Package net.simplace.sim.io
Klasse FileData
java.lang.Object
net.simplace.sim.io.FileData
- Autor:
- Andreas Enders
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungFileData(String aPathname, String aContent, FWSimSession aActiveInSession) FileData(String aPathname, String aContent, FWSimSession aActiveInSession, String aDivider, String aProjectID) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidcloses the file at the end of the writing or reading process. reset is called resetting the writer.booleanString[][]getDataCache(Integer[] aLinesToRead, Integer aSkipHeaderLines) If filename has changed or accessed for the first time the lines of the file are read from file system.getFile()org.jdom2.ElementIf filename has changed or accessed for the first time the root element of the file are read from file system.booleanvoidvoidsetUpdated(boolean aIsUpdated) toString()voidwriteObjectsToFile(Collection<Object> aCollection, LinkedHashMap<String, FWSimVariable<?>> aHeaderVariables, CSVInterface.DATA_MODE aDataMode) writes all objects to a file with given divider as one new line to the end of the opened file.voidwriteStringsToFile(Collection<String> aCollection) writes all strings to a file with given divider as one new line to the end of the opened file.voidwriteToFile(String aLine) writes all strings to a file with given divider as one new line to the end of the opened file.
-
Konstruktordetails
-
FileData
public FileData(String aPathname, String aContent, FWSimSession aActiveInSession, String aDivider, String aProjectID) - Parameter:
aPathname-aActiveInSession-aDivider-aProjectID-aLinesToRead-
-
FileData
- Parameter:
aPathname-aActiveInSession-aLinesToRead-
-
-
Methodendetails
-
setCache
- Parameter:
aFileData-aWasUpdated-
-
getDataCache
If filename has changed or accessed for the first time the lines of the file are read from file system. If not they are just returned without reading again.- Parameter:
aLinesToRead-aSkipHeaderLines-- Gibt zurück:
- Vector of lines in the file in the given order
- Löst aus:
IOException
-
getRootElement
If filename has changed or accessed for the first time the root element of the file are read from file system. If not it is just returned without reading again.- Gibt zurück:
- root element from xml file
- Löst aus:
IOException
-
writeStringsToFile
writes all strings to a file with given divider as one new line to the end of the opened file.- Parameter:
aCollection-
-
writeObjectsToFile
public void writeObjectsToFile(Collection<Object> aCollection, LinkedHashMap<String, FWSimVariable<?>> aHeaderVariables, CSVInterface.DATA_MODE aDataMode) writes all objects to a file with given divider as one new line to the end of the opened file. For a null object the String "NULL" is writtenor 12.2363452 ==> 12.24 - Parameter:
aCollection-aHeaderVariables-
-
writeToFile
writes all strings to a file with given divider as one new line to the end of the opened file.- Parameter:
aLine-
-
getSession
- Gibt zurück:
- the activeInSession
-
closeFile
public void closeFile()closes the file at the end of the writing or reading process. reset is called resetting the writer. -
setUpdated
public void setUpdated(boolean aIsUpdated) -
isUpdated
public boolean isUpdated() -
getFile
-
getUniqueID
-
equals
-
toString
-