public static void createSummaryInformation ( String filePath , String title ) { if ( filePath == null ) { return ; } try { File poiFilesystem = new File ( filePath ) ; InputStream is = new FileInputStream ( poiFilesystem ) ; POIFSFileSystem poifs = new POIFSFileSystem ( is ) ; is . close ( ) ; DirectoryEntry dir = poifs . getRoot ( ) ; SummaryInformation si = PropertySetFactory . newSummaryInformation ( ) ; si . setTitle ( title ) ; si . setAuthor ( ReleaseInfoAdapter . getCompany ( ) ) ; si . setApplicationName ( "NextReports " + ReleaseInfoAdapter . getVersionNumber ( ) ) ; si . setSubject ( "Created by NextReports Designer" + ReleaseInfoAdapter . getVersionNumber ( ) ) ; si . setCreateDateTime ( new Date ( ) ) ; si . setKeywords ( ReleaseInfoAdapter . getHome ( ) ) ; si . write ( dir , SummaryInformation . DEFAULT_STREAM_NAME ) ; OutputStream out = new FileOutputStream ( poiFilesystem ) ; poifs . writeFilesystem ( out ) ; out . close ( ) ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; } }
is called also on the server