implement gzip compression for unbundle command

This commit is contained in:
Sebastian Sdorra
2014-12-01 11:14:19 +01:00
parent 0cd09bf226
commit 34d05ef3a0
7 changed files with 241 additions and 27 deletions

View File

@@ -58,6 +58,7 @@ import java.io.InputStream;
import java.util.Collection;
import java.util.List;
import javax.ws.rs.core.MediaType;
/**
@@ -80,6 +81,9 @@ public class JerseyRepositoryClientHandler
/** Field description */
private static final String PARAM_BUNDLE = "bundle";
/** Field description */
private static final String PARAM_COMPRESSED = "compressed";
/** Field description */
private static final String PARAM_NAME = "name";
@@ -113,7 +117,8 @@ public class JerseyRepositoryClientHandler
public Repository importFromBundle(ImportBundleRequest request)
{
WebResource r = client.resource(getImportUrl(request.getType(),
IMPORT_TYPE_BUNDLE));
IMPORT_TYPE_BUNDLE)).queryParam(PARAM_COMPRESSED,
Boolean.toString(request.isCompressed()));
Repository repository = null;
InputStream stream = null;