public class TtbinFileWriter extends Object
Modifier and Type | Method and Description |
---|---|
String |
getFullFileName(String path,
String deviceName,
hirondelle.date4j.DateTime dateTime,
String type)
This method gets the full filename of the TTBIN file
|
static TtbinFileWriter |
getInstance()
Returns the one and only instance of this class (Singleton)
|
boolean |
verifyTtbinFile(String fileName,
UsbFile file)
This method verifies the written file against the file data in file
|
boolean |
writeTtbinFile(String fileName,
UsbFile file)
Writes the UsbFile data to a ttbin file.
|
boolean |
writeTtbinMetadataFile(String ttbinFileName,
ActivityData data) |
public static TtbinFileWriter getInstance()
public String getFullFileName(String path, String deviceName, hirondelle.date4j.DateTime dateTime, String type)
path
- Base pathdeviceName
- Device namedateTime
- Date time of the tracktype
- Type of the trackpublic boolean writeTtbinFile(String fileName, UsbFile file)
fileName
- Name of the file to write to. Use getFullFilename()file
- The file containing the raw datapublic boolean verifyTtbinFile(String fileName, UsbFile file)
fileName
- Name of the file to checkfile
- File containing the data to check againstpublic boolean writeTtbinMetadataFile(String ttbinFileName, ActivityData data)
Copyright © 2020. All rights reserved.