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