getDownloadable() 추가

master
mjkhan21 7 months ago
parent 7cce781125
commit c41590f080

@ -10,6 +10,7 @@ import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import cokr.xit.foundation.Assert; import cokr.xit.foundation.Assert;
import cokr.xit.foundation.Downloadable;
import kr.dogfoot.hwplib.object.HWPFile; import kr.dogfoot.hwplib.object.HWPFile;
import kr.dogfoot.hwplib.object.bodytext.control.Control; import kr.dogfoot.hwplib.object.bodytext.control.Control;
import kr.dogfoot.hwplib.object.bodytext.control.ControlField; import kr.dogfoot.hwplib.object.bodytext.control.ControlField;
@ -176,4 +177,14 @@ public class HWPWriter extends HWP {
throw Assert.runtimeException(e); throw Assert.runtimeException(e);
} }
} }
/** HWPWriter Downloadable .
* Downloadable .
* @return Downloadable
*/
public Downloadable getDownloadable() {
return new Downloadable()
.setContentType(MIME_TYPE)
.setWriter(this::write);
}
} }

@ -15,6 +15,8 @@ import java.util.stream.IntStream;
import org.apache.poi.ss.usermodel.CellStyle; import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.ss.util.CellRangeAddress;
import cokr.xit.foundation.Downloadable;
/** /**
* @author mjkhan * @author mjkhan
*/ */
@ -346,4 +348,14 @@ public class XLSWriter extends XLS {
super.clear(all); super.clear(all);
trackWidths = null; trackWidths = null;
} }
/** XLSWriter Downloadable .
* Downloadable .
* @return Downloadable
*/
public Downloadable getDownloadable() {
return new Downloadable()
.setContentType(MIME_TYPE)
.setWriter(this::write);
}
} }
Loading…
Cancel
Save