org.restlet.engine.local
Class ZipEntryRepresentation
java.lang.Object
org.restlet.representation.Variant
org.restlet.representation.RepresentationInfo
org.restlet.representation.Representation
org.restlet.representation.StreamRepresentation
org.restlet.engine.local.ZipEntryRepresentation
public class ZipEntryRepresentation
- extends StreamRepresentation
An entry in a Zip/JAR file.
It is very important release()
is called to close the underlying Zip
file.
- Author:
- Remi Dewitte
Field Summary |
protected java.util.zip.ZipEntry |
entry
The Zip entry. |
protected java.util.zip.ZipFile |
zipFile
The Zip file. |
Method Summary |
java.io.InputStream |
getStream()
|
void |
release()
|
void |
write(java.io.OutputStream outputStream)
|
Methods inherited from class org.restlet.representation.Representation |
checkDigest, checkDigest, computeDigest, createEmpty, exhaust, getAvailableSize, getDigest, getDisposition, getDownloadName, getExpirationDate, getRange, getSize, getText, isAvailable, isDownloadable, isTransient, setAvailable, setDigest, setDisposition, setDownloadable, setDownloadName, setExpirationDate, setRange, setSize, setTransient |
Methods inherited from class org.restlet.representation.Variant |
createClientInfo, equals, getCharacterSet, getEncodings, getIdentifier, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setIdentifier, setIdentifier, setLanguages, setLocationRef, setLocationRef, setMediaType, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
zipFile
protected final java.util.zip.ZipFile zipFile
- The Zip file.
entry
protected final java.util.zip.ZipEntry entry
- The Zip entry.
ZipEntryRepresentation
public ZipEntryRepresentation(MediaType mediaType,
java.util.zip.ZipFile zipFile,
java.util.zip.ZipEntry entry)
- Constructor.
- Parameters:
mediaType
- The entry media type.zipFile
- The parent Zip archive file.entry
- The Zip entry.
release
public void release()
- Overrides:
release
in class Representation
getStream
public java.io.InputStream getStream()
throws java.io.IOException
- Specified by:
getStream
in class Representation
- Throws:
java.io.IOException
write
public void write(java.io.OutputStream outputStream)
throws java.io.IOException
- Specified by:
write
in class Representation
- Throws:
java.io.IOException
Copyright © 2005-2011 Noelios Technologies.