Package ca.eandb.jdcp.job

Examples of ca.eandb.jdcp.job.HostService


  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Display#finish()
   */
  @Override
  public void finish() {
    HostService service = JdcpUtil.getHostService();
    try {
      FileOutputStream os = (service != null) ? service
          .createFileOutputStream(fileName) : new FileOutputStream(
          fileName);

      picture.write(os);
    } catch (IOException e) {
View Full Code Here


   * Gets the <code>OutputStream</code> to write to.
   * @return The <code>OutputStream</code> to write to.
   * @throws FileNotFoundException If the file cannot be created.
   */
  private FileOutputStream getOutputStream() throws FileNotFoundException {
    HostService service = JdcpUtil.getHostService();
    if (service != null) {
      return service.createFileOutputStream(fileName);
    } else {
      return new FileOutputStream(fileName);
    }
  }
View Full Code Here

   * Gets the <code>OutputStream</code> to write to.
   * @return The <code>OutputStream</code> to write to.
   * @throws FileNotFoundException If the file cannot be created.
   */
  private FileOutputStream getOutputStream() throws FileNotFoundException {
    HostService service = JdcpUtil.getHostService();
    if (service != null) {
      return service.createFileOutputStream(fileName);
    } else {
      return new FileOutputStream(fileName);
    }
  }
View Full Code Here

   */
  @Override
  public void finish() {
    try {
      ImageOutputStream out;
      HostService service = JdcpUtil.getHostService();
      if (service != null) {
        RandomAccessFile file = service.createRandomAccessFile(fileName);
        out = new FileImageOutputStream(file);
      } else {
        out = new FileImageOutputStream(new File(fileName));
      }
      image.write(out);
View Full Code Here

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Display#finish()
   */
  @Override
  public void finish() {
    HostService service = JdcpUtil.getHostService();
    try {
      FileOutputStream os = (service != null) ? service
          .createFileOutputStream(fileName) : new FileOutputStream(
          fileName);

      picture.write(os);
    } catch (IOException e) {
View Full Code Here

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Display#finish()
   */
  public void finish() {
    HostService service = JdcpUtil.getHostService();
    try {
      int width = image.rows();
      int height = image.columns();
      BufferedImage bi = new BufferedImage(width, height,
          BufferedImage.TYPE_INT_RGB);

      FileOutputStream os = (service != null) ? service
          .createFileOutputStream(fileName) : new FileOutputStream(
          fileName);

      String formatName = FileUtil.getExtension(fileName);
      if (formatName.equals("")) {
View Full Code Here

TOP

Related Classes of ca.eandb.jdcp.job.HostService

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.