org.restlet.engine.http.io

## Class ClosingRepresentation

- java.lang.Object
- - org.restlet.representation.Variant
  - - org.restlet.representation.RepresentationInfo
    - - org.restlet.representation.Representation
      - - org.restlet.util.WrapperRepresentation
        - - org.restlet.engine.http.io.ClosingRepresentation

    public class ClosingRepresentation
    extends WrapperRepresentation

Wrapper representation to close the associated socket when the representation is released.

Author:
  Jerome Louvel

### Field Summary

### Fields inherited from class org.restlet.representation.Representation

`UNKNOWN_SIZE`

### Constructor Summary

Constructors
Constructor and Description
`ClosingRepresentation(Representation wrappedRepresentation, java.net.Socket socket, java.util.logging.Logger logger)` Constructor.

### Method Summary

Methods
`void` `release()` Closes the socket if necessary.

### Methods inherited from class org.restlet.util.WrapperRepresentation

`checkDigest, checkDigest, computeDigest, exhaust, getAvailableSize, getChannel, getCharacterSet, getDigest, getDisposition, getDownloadName, getEncodings, getExpirationDate, getIdentifier, getLanguages, getLocationRef, getMediaType, getModificationDate, getRange, getReader, getSize, getStream, getTag, getText, getWrappedRepresentation, isAvailable, isDownloadable, isTransient, setAvailable, setCharacterSet, setDigest, setDisposition, setDownloadable, setDownloadName, setEncodings, setExpirationDate, setIdentifier, setIdentifier, setLanguages, setLocationRef, setLocationRef, setMediaType, setModificationDate, setRange, setSize, setTag, setTransient, write, write, write`

### Methods inherited from class org.restlet.representation.Representation

`createEmpty`

### Methods inherited from class org.restlet.representation.Variant

`createClientInfo, equals, includes, isCompatible, toString`

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

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

### Constructor Detail

#### ClosingRepresentation

    public ClosingRepresentation(Representation wrappedRepresentation,
                         java.net.Socket socket,
                         java.util.logging.Logger logger)

Constructor.

Parameters:
  `wrappedRepresentation` - The wrapped representation.
  `socket` - The associated socket.
  `logger` - The associated logger.

### Method Detail

#### release

    public void release()

Closes the socket if necessary.

Overrides:
  `release` in class `WrapperRepresentation`