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

com.hubspot.horizon.apache.internal.SnappyDecompressingEntity Maven / Gradle / Ivy

There is a newer version: 0.3.1
Show newest version
package com.hubspot.horizon.apache.internal;

import org.apache.http.HttpEntity;
import org.apache.http.client.entity.DecompressingEntity;
import org.apache.http.client.entity.InputStreamFactory;
import org.xerial.snappy.SnappyInputStream;

import java.io.IOException;
import java.io.InputStream;

public class SnappyDecompressingEntity extends DecompressingEntity {

  public SnappyDecompressingEntity(HttpEntity wrapped) {
    super(wrapped, new InputStreamFactory() {

      @Override
      public InputStream create(InputStream input) throws IOException {
        return new SnappyInputStream(input);
      }
    });
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy