|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.garmin.fit.FileEncoder
public class FileEncoder
Encodes message objects into a FIT binary file.
Constructor Summary | |
---|---|
FileEncoder()
|
|
FileEncoder(java.io.File file)
Deprecated. Encoder now supports encoding files of differing protocol versions, use FileEncoder(File, Fit.ProtocolVersion) to ensure
the encoder is validating your files correctly |
|
FileEncoder(java.io.File file,
Fit.ProtocolVersion version)
Constructs a new File Encoder for specified file |
Method Summary | |
---|---|
void |
close()
Updates the data size in the file header, writes the CRC, and closes the file. |
void |
onMesg(Mesg mesg)
MesgListener interface. |
void |
onMesgDefinition(MesgDefinition mesgDefinition)
MesgDefinitionListener interface. |
void |
open(java.io.File file)
Opens file for writing. |
void |
write(java.util.List<Mesg> mesgs)
Writes a list of messages to the file. |
void |
write(Mesg mesg)
Writes a message to the file. |
void |
write(MesgDefinition mesgDefinition)
Writes a message definition to the file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileEncoder()
@Deprecated public FileEncoder(java.io.File file)
FileEncoder(File, Fit.ProtocolVersion)
to ensure
the encoder is validating your files correctly
file
- File to writepublic FileEncoder(java.io.File file, Fit.ProtocolVersion version)
file
- File to writeversion
- Fit Protocol Version to use when writing filesMethod Detail |
---|
public void open(java.io.File file)
file
- file to writepublic void onMesg(Mesg mesg)
onMesg
in interface MesgListener
public void onMesgDefinition(MesgDefinition mesgDefinition)
onMesgDefinition
in interface MesgDefinitionListener
public void write(MesgDefinition mesgDefinition)
mesgDefinition
- message definition object to writepublic void write(Mesg mesg)
mesg
- message object to writepublic void write(java.util.List<Mesg> mesgs)
mesgs
- list message objects to writepublic void close()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |