Package org.nuxeo.ecm.core.api.impl.blob
Class ZipEntryBlob
- java.lang.Object
- 
- org.nuxeo.ecm.core.api.impl.blob.AbstractBlob
- 
- org.nuxeo.ecm.core.api.impl.blob.ZipEntryBlob
 
 
- 
- All Implemented Interfaces:
- Serializable,- Blob
 
 public class ZipEntryBlob extends AbstractBlob implements Serializable ABlobbacked by an entry in a ZIP file.- Since:
- 7.2
- See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classZipEntryBlob.ZipEntryInputStreamInputStreamfor a ZIP entry, that closes all necessary resources when closed.
 - 
Field SummaryFields Modifier and Type Field Description protected StringentryNameprotected BlobzipBlobprotected ZipEntryzipEntryprotected ZipFilezipFile- 
Fields inherited from class org.nuxeo.ecm.core.api.impl.blob.AbstractBlobdigest, digestAlgorithm, encoding, filename, mimeType, TEXT_PLAIN, UTF_8
 
- 
 - 
Constructor SummaryConstructors Constructor Description ZipEntryBlob(ZipFile zipFile, ZipEntry zipEntry)Creates aBlobfrom an entry in a zip file.ZipEntryBlob(Blob zipBlob, String entryName)Creates aBlobfrom an entry in a ZIP file blob.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFilename()longgetLength()Gets the data length in bytes if known.InputStreamgetStream()Gets anInputStreamfor the data of this blob.- 
Methods inherited from class org.nuxeo.ecm.core.api.impl.blob.AbstractBlobequals, equalsStream, getByteArray, getCloseableFile, getCloseableFile, getDigest, getDigestAlgorithm, getEncoding, getFile, getMimeType, getString, hashCode, setDigest, setDigestAlgorithm, setEncoding, setFilename, setMimeType, transferTo, transferTo
 
- 
 
- 
- 
- 
Method Detail- 
getStreampublic InputStream getStream() throws IOException Description copied from interface:BlobGets anInputStreamfor the data of this blob.The contract of Blobis that this method can be called several times and will correctly return a newInputStreameach time. In other words, several reads of theBlobcan be done.Like all InputStream, the result must be closed when done with it to avoid resource leaks.- Specified by:
- getStreamin interface- Blob
- Returns:
- the stream
- Throws:
- IOException
 
 - 
getLengthpublic long getLength() Description copied from interface:BlobGets the data length in bytes if known.- Specified by:
- getLengthin interface- Blob
- Overrides:
- getLengthin class- AbstractBlob
- Returns:
- the data length or -1 if not known
 
 - 
getFilenamepublic String getFilename() - Specified by:
- getFilenamein interface- Blob
- Overrides:
- getFilenamein class- AbstractBlob
 
 
- 
 
-