org.restlet.engine.local

## Class ZipClientHelper

- java.lang.Object
- - org.restlet.engine.Helper
  - - org.restlet.engine.RestletHelper<T>
    - - org.restlet.engine.ConnectorHelper<Client>
      - - org.restlet.engine.ClientHelper
        - - org.restlet.engine.local.LocalClientHelper
          - - org.restlet.engine.local.ZipClientHelper

    public class ZipClientHelper
    extends LocalClientHelper

ZIP and JAR client connector. Only works for archives available as local files.
Handles GET, HEAD and PUT request on resources referenced as : zip:file://<file path>

Author:
  Remi Dewitte <remi@gide.net>

### Constructor Summary

Constructors
Constructor and Description
`ZipClientHelper(Client client)` Constructor.

### Method Summary

Methods
`protected void` `handleGet(Request request, Response response, java.io.File file, java.lang.String entryName, MetadataService metadataService)` Handles a GET call.
`protected void` `handleLocal(Request request, Response response, java.lang.String decodedPath)` Handles a call for a local entity.
`protected void` `handlePut(Request request, Response response, java.io.File file, java.lang.String entryName)` Handles a PUT call.

### Methods inherited from class org.restlet.engine.local.LocalClientHelper

`getDefaultLanguage, getTimeToLive, handle`

### Methods inherited from class org.restlet.engine.ClientHelper

`getConnectTimeout`

### Methods inherited from class org.restlet.engine.ConnectorHelper

`getConnectorService, getContext, getProtocols, start, stop, update`

### Methods inherited from class org.restlet.engine.RestletHelper

`getAttributes, getHelped, getHelpedParameters, getLogger, getMetadataService, setHelped`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ZipClientHelper

    public ZipClientHelper(Client client)

Constructor.

Parameters:
  `client` - The helped client.

### Method Detail

#### handleLocal

    protected void handleLocal(Request request,
                   Response response,
                   java.lang.String decodedPath)

Handles a call for a local entity. By default, only GET and HEAD methods are implemented.

Specified by:
  `handleLocal` in class `LocalClientHelper`
Parameters:
  `request` - The request to handle.
  `response` - The response to update.
  `decodedPath` - The URL decoded entity path.

#### handleGet

    protected void handleGet(Request request,
                 Response response,
                 java.io.File file,
                 java.lang.String entryName,
                 MetadataService metadataService)

Handles a GET call.

Parameters:
  `request` - The request to answer.
  `response` - The response to update.
  `file` - The Zip archive file.
  `entryName` - The Zip archive entry name.
  `metadataService` - The metadata service.

#### handlePut

    protected void handlePut(Request request,
                 Response response,
                 java.io.File file,
                 java.lang.String entryName)

Handles a PUT call.

Parameters:
  `request` - The request to answer.
  `response` - The response to update.
  `file` - The Zip archive file.
  `entryName` - The Zip archive entry name.