This library is meant to be used for reading and writing of ADIF data (ADI format only for now, although the XML based ADIX is almost the same).
The current format I am targeting is ADIF 3.0.5 as described at the ADIF site.
This code is released under the Apache License 2.0
This library is released on Maven Central so just add the dependency to your pom.xml
:
<dependency>
<groupId>org.marsik.ham</groupId>
<artifactId>adif</artifactId>
<version>1.0</version>
</dependency>
import org.marsik.ham.adif.Adif3
import org.marsik.ham.adif.AdiReader
AdiReader reader = new AdiReader();
BufferedReader buffInput = ...; // get buffered reader from stream or file
Optional<Adif3> adif = reader.read(buffInput);
import org.marsik.ham.adif.Adif3Record
import org.marsik.ham.adif.AdifHeader
import org.marsik.ham.adif.AdiWriter
AdiWriter writer = new AdiWriter();
writer.append(/* AdifHeader */)
for Adif3Record record: /* some data source */ {
writer.append(record);
}
writer.toString() // -> to some output