Package org.xnap.commons.io

Examples of org.xnap.commons.io.SubTaskProgressMonitor


        client.type(HylaFAXClient.TYPE_IMAGE);

        String serverCoverFilename = null;
        if (fax.cover != null && fax.coverIn != null) {
          monitor.setText(i18n.tr("Generating cover"));
          SubTaskProgressMonitor coverMonitor = new SubTaskProgressMonitor(monitor, 5, 0);
          StringBuffer data = fax.cover.generate(fax.coverIn, coverMonitor);
          coverMonitor.done();
         
            // Cover senden
                    byte[] buffer = data.toString().getBytes(FaxCover.CHARSET);
          TransferMonitor transferMonitor = new TransferMonitor(monitor, 5, buffer.length);
          client.addTransferListener(transferMonitor);
View Full Code Here


      public File run(ProgressMonitor monitor) throws Exception
      {
        monitor.setTotalSteps(10);
       
        monitor.setText(i18n.tr("Generating cover"));
        SubTaskProgressMonitor coverMonitor = new SubTaskProgressMonitor(monitor, 5, 0);
        StringBuffer data = fax.cover.generate(fax.coverIn, coverMonitor);
        coverMonitor.done();
       
        File outputFile = File.createTempFile("jhylafax", ".ps");
        outputFile.deleteOnExit();
        OutputStream out = new FileOutputStream(outputFile);
        monitor.setText(i18n.tr("Saving cover"));
View Full Code Here

public class TransferMonitor implements TransferListener {

  private SubTaskProgressMonitor monitor;

  public TransferMonitor(ProgressMonitor monitor, int amount, long totalSize) {
    this.monitor = new SubTaskProgressMonitor(monitor, amount, totalSize);
  }
View Full Code Here

TOP

Related Classes of org.xnap.commons.io.SubTaskProgressMonitor

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.