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

nbbrd.io.http.StreamDecoder Maven / Gradle / Ivy

The newest version!
package nbbrd.io.http;

import lombok.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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy