Package com.sos.JSHelper.Exceptions

Examples of com.sos.JSHelper.Exceptions.JobSchedulerException


   */
  public void ascii() {
    try {
      boolean flgResult = Client().setFileType(FTP.ASCII_FILE_TYPE);
      if (flgResult == false) {
        throw new JobSchedulerException("setFileType not possible, due to : " + getReplyString());
      }
    }
    catch (IOException e) {
      throw new JobSchedulerException("ascii returns an exception", e);
    }
  }
View Full Code Here


   */
  public void binary() {
    try {
      boolean flgResult = Client().setFileType(FTP.BINARY_FILE_TYPE);
      if (flgResult == false) {
        throw new JobSchedulerException("setFileType not possible, due to : " + getReplyString());
      }
    }
    catch (IOException e) {
      throw new JobSchedulerException("setFileType to binary returns an exception", e);
    }
  }
View Full Code Here

    }
    catch (FileNotFoundException e) {
      e.printStackTrace();
      String strT = String.format("%1$s failed", conMethodName);
      logger.error(strT, e);
      throw new JobSchedulerException(strT, e);
    }
    return objO;
  }
View Full Code Here

    }
    catch (FileNotFoundException e) {
      e.printStackTrace();
      String strT = String.format("%1$s failed", conMethodName);
      logger.error(strT, e);
      throw new JobSchedulerException(strT, e);
    }
    return objInputStream;
  }
View Full Code Here

    }
    catch (FileNotFoundException e) {
      e.printStackTrace();
      String strT = String.format("%1$s failed", conMethodName);
      logger.error(strT, e);
      throw new JobSchedulerException(strT, e);
    }
    return objOutputStream;
  }
View Full Code Here

      fleSourceTransferFile = File.createTempFile("sos", pstrZipFileNameExtension);
      // fleSourceTransferFile.deleteOnExit();
      strSourceTransferName = fleSourceTransferFile.getAbsolutePath();
    }
    catch (Exception e) {
      throw new JobSchedulerException("createTempFile returns with an exception", e);
    }
    try {
      logger.info("start compress file");
      this.compressFile(fleSourceTransferFile);
    }
    catch (Exception e) {
      e.printStackTrace(System.err);
      logger.error(e.getLocalizedMessage(), new JobSchedulerException("SOSGZip returns an exception", e));
      // throw new JobSchedulerException("SOSGZip returns an exception", e);
    }
    return strSourceTransferName;
  }
View Full Code Here

      while ((bytesRead = in.read(buffer)) != -1) {
        out.write(buffer, 0, bytesRead);
      }
    }
    catch (Exception e) {
      throw new JobSchedulerException("GZip failed", e);
    }
    finally {
      try {
        if (in != null)
          in.close();
View Full Code Here

        objInputStream.close();
      }
    }
    catch (IOException e) {
      e.printStackTrace();
      throw new JobSchedulerException(String.format("%1$s failed", conMethodName), e);
    }
    finally {
      objInputStream = null;
    }
View Full Code Here

      this.getFileOutputStream().flush();
      this.getFileOutputStream().close();
    }
    catch (IOException e) {
      e.printStackTrace();
      throw new JobSchedulerException(String.format("%1$s failed", conMethodName), e);
    }
    finally {
      objOutputStream = null;
    }
  }
View Full Code Here

    try {
      this.getFileOutputStream().flush();
    }
    catch (IOException e) {
      e.printStackTrace();
      throw new JobSchedulerException(String.format("%1$s failed", conMethodName), e);
    }

  }
View Full Code Here

TOP

Related Classes of com.sos.JSHelper.Exceptions.JobSchedulerException

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.