public class ZipEntryBlob extends AbstractBlob implements Serializable
Blob
backed by an entry in a ZIP file.TEXT_PLAIN, UTF_8
Constructor and Description |
---|
ZipEntryBlob(ZipFile zipFile,
ZipEntry zipEntry)
Creates a
Blob from an entry in a zip file. |
Modifier and Type | Method and Description |
---|---|
long |
getLength()
Gets the data length in bytes if known.
|
InputStream |
getStream()
Gets an
InputStream for the data of this blob. |
equals, getByteArray, getCloseableFile, getCloseableFile, getDigest, getEncoding, getFile, getFilename, getMimeType, getString, hashCode, setDigest, setEncoding, setFilename, setMimeType, transferTo, transferTo
public InputStream getStream() throws IOException
Blob
InputStream
for the data of this blob.
The contract of Blob
is that this method can be called several times and will correctly return a new
InputStream
each time. In other words, several reads of the Blob
can be done.
Like all InputStream
, the result must be closed when done with it to avoid resource leaks.
getStream
in interface Blob
IOException
public long getLength()
Blob
getLength
in interface Blob
getLength
in class AbstractBlob
Copyright © 2015 Nuxeo SA. All rights reserved.