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

internal.sdmxdl.NoOpFileFormat Maven / Gradle / Ivy

The newest version!
package internal.sdmxdl;

import lombok.NonNull;
import sdmxdl.HasPersistence;
import sdmxdl.ext.FileFormat;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Path;

public final class NoOpFileFormat implements FileFormat {

    @Override
    public @NonNull T parsePath(@NonNull Path source) throws IOException {
        throw new IOException("Cannot parse file");
    }

    @Override
    public @NonNull T parseStream(@NonNull InputStream resource) throws IOException {
        throw new IOException("Cannot parse stream");
    }

    @Override
    public void formatPath(@NonNull T value, @NonNull Path target) throws IOException {
        throw new IOException("Cannot format file");
    }

    @Override
    public void formatStream(@NonNull T value, @NonNull OutputStream resource) throws IOException {
        throw new IOException("Cannot format stream");
    }

    @Override
    public @NonNull String getFileExtension() {
        return ".null";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy