Package net.minecraftforge.event.world

Examples of net.minecraftforge.event.world.ChunkDataEvent$Save


    File docxFile = new File(System.getProperty("user.dir") + "/zip.docx");
   
    ZipPartStore zps = new ZipPartStore();
    zps.setSourcePartStore(opc.getSourcePartStore());
   
    Save saver = new Save(opc, zps);
    FileOutputStream fos = null;
    try {
      fos = new FileOutputStream(docxFile);
      saver.save(fos);
    } catch (FileNotFoundException e) {
      throw new Docx4JException("Couldn't save " + docxFile.getPath(), e);
    } finally {
      IOUtils.closeQuietly(fos);
    }     
View Full Code Here


        throw new Docx4JException("Exception marshalling document for output: " + e.getMessage(), e);
      }
    }
    else {
//      SaveToZipFile saver = new SaveToZipFile(wmlPackage);
      Save saver = new Save(this);
      saver.save(outStream);
    }
    new EventFinished(startEvent).publish();
 
View Full Code Here

    // We want to save images as they're created, so define our saver
    File baseDir = new File(System.getProperty("user.dir") + "/OUT_unzipped");
    baseDir.mkdir(); // TODO: directory should be empty, since old images won't get overwritten
   
    UnzippedPartStore ups = new UnzippedPartStore(baseDir);
    Save saver = new Save(wordMLPackage, ups);
   
   
    // Apply the bindings
   
//    if (hyperlinkStyle!=null) {
//      BindingHandler.getHyperlinkResolver().setHyperlinkStyle(hyperlinkStyle);
//    }
    BindingHandler bh = new BindingHandler(wordMLPackage);
    bh.applyBindings(wordMLPackage.getMainDocumentPart());
   
    // If you inspect the output, you should see your data in 2 places:
    // 1. the custom xml part
    // 2. (more importantly) the main document part
    System.out.println(
        XmlUtils.marshaltoString(wordMLPackage.getMainDocumentPart().getJaxbElement(), true, true)
        );
   
    // Strip content controls
    // RemovalHandler rh = new RemovalHandler(); // NB: this only removes if OpenDoPE tags are present (they aren't in binding-simple.docx)
   
    //wordMLPackage.save(new java.io.File(outputfilepath) );
   
    saver.save(null);
    // now zip up that dir, and rename to docx.
  }
View Full Code Here

    File baseDir = new File(System.getProperty("user.dir") + "/OUT");
    baseDir.mkdir();
   
    UnzippedPartStore ups = new UnzippedPartStore(baseDir);
    ups.setSourcePartStore(wordMLPackage.getSourcePartStore());
    Save saver = new Save(wordMLPackage, ups);
   
    saver.save(null);
  }
View Full Code Here

TOP

Related Classes of net.minecraftforge.event.world.ChunkDataEvent$Save

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.