de.uka.ipd.sdq.ByCounter.reporting
Class CountingResultCSVWriter

java.lang.Object
  extended by de.uka.ipd.sdq.ByCounter.reporting.CountingResultCSVWriter
All Implemented Interfaces:
ICountingResultWriter

public class CountingResultCSVWriter
extends java.lang.Object
implements ICountingResultWriter

Docs TODO

Since:
0.1
Version:
1.2
Author:
Michael Kuperberg, Martin Krogmann

Constructor Summary
CountingResultCSVWriter()
           
CountingResultCSVWriter(boolean appendGrandTotalAtTheEnd, char entriesSeparationChar, boolean listInvokeOpcodes, boolean performIntegrityCheckOnInvokeOpcodes, java.lang.String pieceFileNameCore, java.lang.String pieceFileNameExtension, java.lang.String pieceFilePath, boolean writeBooleansAsIntegers, boolean writeOpcodesAsIntegers, boolean writeUnusedOpcodes, boolean truncateUndefinedOpcodes, boolean writeArrayDetailsToSeparateFile)
          TODO
 
Method Summary
 java.io.File getLastWrittenFile()
           
 boolean isWriteBooleansAsIntegers()
           
 boolean isWriteOpcodesAsIntegers()
           
static CountingResult readCountingResultFromCSV(java.io.File csvFile)
          Constructs an instance of CountingResult as written by writeResultToFile(CountingResult, boolean, long).
 void setWriteBooleansAsIntegers(boolean writeBooleansAsIntegers)
           
 void setWriteOpcodesAsIntegers(boolean writeOpcodesAsIntegers)
           
 long writeResultToFile(CountingResult cr, boolean usePrevTimestamp, long prevTimestampToUse)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountingResultCSVWriter

public CountingResultCSVWriter()

CountingResultCSVWriter

public CountingResultCSVWriter(boolean appendGrandTotalAtTheEnd,
                               char entriesSeparationChar,
                               boolean listInvokeOpcodes,
                               boolean performIntegrityCheckOnInvokeOpcodes,
                               java.lang.String pieceFileNameCore,
                               java.lang.String pieceFileNameExtension,
                               java.lang.String pieceFilePath,
                               boolean writeBooleansAsIntegers,
                               boolean writeOpcodesAsIntegers,
                               boolean writeUnusedOpcodes,
                               boolean truncateUndefinedOpcodes,
                               boolean writeArrayDetailsToSeparateFile)
TODO

Parameters:
appendGrandTotalAtTheEnd -
entriesSeparationChar -
listInvokeOpcodes -
performIntegrityCheckOnInvokeOpcodes -
pieceFileNameCore -
pieceFileNameExtension -
pieceFilePath -
writeBooleansAsIntegers -
writeOpcodesAsIntegers -
writeUnusedOpcodes -
truncateUndefinedOpcodes -
writeArrayDetailsToSeparateFile -
Method Detail

readCountingResultFromCSV

public static CountingResult readCountingResultFromCSV(java.io.File csvFile)
                                                throws java.io.IOException
Constructs an instance of CountingResult as written by writeResultToFile(CountingResult, boolean, long).

Parameters:
csvFile - The File that points to the csv file.
Returns:
An instance of CountingResult or null if an error occurred.
Throws:
java.io.IOException - When reading fails.

isWriteBooleansAsIntegers

public boolean isWriteBooleansAsIntegers()

isWriteOpcodesAsIntegers

public boolean isWriteOpcodesAsIntegers()

setWriteBooleansAsIntegers

public void setWriteBooleansAsIntegers(boolean writeBooleansAsIntegers)

setWriteOpcodesAsIntegers

public void setWriteOpcodesAsIntegers(boolean writeOpcodesAsIntegers)

writeResultToFile

public long writeResultToFile(CountingResult cr,
                              boolean usePrevTimestamp,
                              long prevTimestampToUse)
Specified by:
writeResultToFile in interface ICountingResultWriter
Parameters:
cr - CountingResult to write
usePrevTimestamp - TODO explain
Returns:
timestamp that is part of the file name (if usePrevTimestamp==false, the returned timestamp is internally generated by this method)

getLastWrittenFile

public java.io.File getLastWrittenFile()
Returns:
the File where the last csv file was written.