internal.util.http.StreamDecoder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdmx-dl-provider-ri Show documentation
Show all versions of sdmx-dl-provider-ri Show documentation
Easily download official statistics - RI
package internal.util.http;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.io.IOException;
import java.io.InputStream;
public interface StreamDecoder {
@NonNull String getName();
@NonNull InputStream decode(@NonNull InputStream stream) throws IOException;
static @NonNull StreamDecoder noOp() {
return HttpImpl.StreamDecoders.NONE;
}
static @NonNull StreamDecoder gzip() {
return HttpImpl.StreamDecoders.GZIP;
}
static @NonNull StreamDecoder deflate() {
return HttpImpl.StreamDecoders.DEFLATE;
}
}