All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openlr.binary.BinaryMarshallerFactory Maven / Gradle / Ivy

The newest version!
package org.openlr.binary;

import org.openlr.binary.reader.*;
import org.openlr.binary.writer.LocationReferenceWriterFactory;

import java.util.Base64;

/**
 * Responsible for creating instances of {@link BinaryMarshaller}.
 */
public class BinaryMarshallerFactory {
    private LocationReferenceReaderFactory locationReferenceReaderFactory = new LocationReferenceReaderFactory();
    private LocationReferenceWriterFactory locationReferenceWriterFactory = new LocationReferenceWriterFactory();

    /**
     * Create an instance of the binary marshaller.
     *
     * @return the binary marshaller instance
     */
    public BinaryMarshaller create() {
        return new BinaryMarshallerImpl(
                Base64.getDecoder(),
                Base64.getEncoder(),
                locationReferenceReaderFactory.create(),
                locationReferenceWriterFactory.create());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy