1 2 17 18 19 package org.apache.poi.poifs.property; 20 21 import org.apache.poi.poifs.filesystem.POIFSDocument; 22 23 28 29 public class DocumentProperty 30 extends Property 31 { 32 33 private POIFSDocument _document; 35 36 42 43 public DocumentProperty(final String name, final int size) 44 { 45 super(); 46 _document = null; 47 setName(name); 48 setSize(size); 49 setNodeColor(_NODE_BLACK); setPropertyType(PropertyConstants.DOCUMENT_TYPE); 51 } 52 53 60 61 protected DocumentProperty(final int index, final byte [] array, 62 final int offset) 63 { 64 super(index, array, offset); 65 _document = null; 66 } 67 68 73 74 public void setDocument(POIFSDocument doc) 75 { 76 _document = doc; 77 } 78 79 84 85 public POIFSDocument getDocument() 86 { 87 return _document; 88 } 89 90 91 92 97 98 public boolean shouldUseSmallBlocks() 99 { 100 return super.shouldUseSmallBlocks(); 101 } 102 103 106 107 public boolean isDirectory() 108 { 109 return false; 110 } 111 112 116 117 protected void preWrite() 118 { 119 120 } 122 123 124 } 126 | Popular Tags |