nbbrd.io.http.StreamDecoder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-io-http Show documentation
Show all versions of java-io-http Show documentation
Common IO utilities - http
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;
}
}