01: /*
02: * ProviderPackageFile for the DPEntry DOM, which is contained in a
03: * Document encapsulated by this class.
04: *
05: * Created on October 25, 2001, 3:05 PM
06: */
07:
08: package com.sun.portal.desktop.deployment;
09:
10: import java.io.InputStream;
11: import java.io.StringWriter;
12: import java.io.ByteArrayInputStream;
13:
14: import java.util.zip.ZipEntry;
15:
16: import org.w3c.dom.Document;
17:
18: /**
19: *
20: * @author yabob
21: * @version
22: */
23: public class ParEntryDomPPF extends ProviderPackageFile {
24:
25: public ParEntryDomPPF(Document doc, String name) {
26:
27: super (ExtractOp.ALLTYPES);
28:
29: m_Doc = doc;
30: m_Name = name;
31: }
32:
33: public InputStream getStream() throws ParFileException {
34: return Par.domToStream(m_Doc);
35: }
36:
37: // This file IS the Par File Entry. We can't have an inclusion on it.
38:
39: public void addManifestInclusion(ParManifest man, String name)
40: throws ParFileException {
41: throw new ParFileException("errorManifestInclusion");
42: }
43:
44: public ZipEntry getZipEntry(ParManifest man)
45: throws ParFileException {
46: return man.getDPZip(m_Name);
47: }
48:
49: private Document m_Doc;
50: protected String m_Name;
51: }
|