hp.opencall.media.ccapi
Class FaxHelper

java.lang.Object
  extended byhp.opencall.media.ccapi.FaxHelper
All Implemented Interfaces:
FaxConstants

public class FaxHelper
extends Object
implements FaxConstants

Provides "static" methods to ready the FAX feature.

Since:
OCMP 2.4 C2

Field Summary
static String DotFax
           
 
Fields inherited from interface hp.telephony.media.FaxConstants
ev_Fax, p_AnswerCED, p_BitRate, p_ByteAlignedEol, p_CapabilityToReceive, p_DataCompressionFormat, p_DeTiffPrefix, p_DeTiffSuffix, p_EnablePolling, p_ErrorCorrection, p_FaxTimeOut, p_FileType, p_InternetRoutingSupport, p_InternetSelectivePollingSupport, p_KeepDataOrder, p_LegalSupport, p_LetterSupport, p_MaxLineToReceive, p_MaxPageToReceive, p_MaxSpeed, p_MinSpeed, p_PageLength, p_PageResolution, p_PagesEncoding, p_PagesPaths, p_PageWidth, p_PasswordSupport, p_PixelArrays, p_Role, p_ScanTimePerLine, p_SelectivePollingSupport, p_SelectivePollingWithSubaddressingSupport, p_StorePath, p_SubaddressingSupport, p_Suffix, p_T37Support, p_T38Support, p_TiffPath, p_VerticalResolution, q_Count, q_Document, q_Page, rtca_AssumeCNG, rtca_Cancel, v_12000bps, v_1216pixelsIn151mm, v_14400bps, v_1728pixelsIn215mm, v_2048pixelsIn255mm, v_2400bps, v_2432pixelsIn303mm, v_33600bps, v_4800bps, v_7200bps, v_864pixelsIn107mm, v_9600bps, v_A4_297mm, v_AfterCNG, v_Answerer, v_B4_364mm, v_BandWarrays, v_BMP, v_Caller, v_DisableECM, v_EnableECM_256bytes, v_EnableECM_64bytes, v_Encoding_MS_BMP, v_Error_Conversion_To_G3, v_Error_Decomp_Init, v_Error_Disconnect, v_Error_File_Open, v_Error_Illegal_Width, v_Error_Page_Format, v_FilesList, v_Fine_196lpi, v_GIF, v_JPEG, v_Normal_98lpi, v_NotSet, v_Page_File_Name_Size, v_PageResolution_0100_0100, v_PageResolution_0200_0100, v_PageResolution_0200_0200, v_PageResolution_0200_0400, v_PageResolution_0300_0300, v_PageResolution_0300_0600, v_PageResolution_0400_0400, v_PageResolution_0400_0800, v_PageResolution_0600_0600, v_PageResolution_0600_1200, v_PageResolution_1200_1200, v_PNG, v_Prefix, v_Rcv_Qual_Bad, v_Rcv_Qual_Medium, v_Rcv_Qual_OK, v_RightNow, v_ST0000, v_ST0505, v_ST1005, v_ST1010, v_ST2010, v_ST2020, v_ST4020, v_ST4040, v_T4_1D_ModifiedHuffman, v_T4_2D_ModifiedRead, v_T4_Buff_Size, v_T6_ModifiedModifiedRead, v_TIFF, v_UnlimitedLength, v_UponRTC
 
Method Summary
static void cleanUpAfterDeTiff(String[] pageArray)
          remove temporary fax files created by startDeTiff().
static void completeDeTiff(String tiffff, String[] pre_detiffed_pages, Dictionary _faxParams)
          Note : this is the Oclet responsibility to remove these files.
static void File__delete(String tmp)
          remove a file.
static boolean File__exists_and_isDirectory(String tmp)
          checks a directory exists.
static boolean File__exists(String tmp)
          checks a file exists.
static int File__length(String tmp)
          retrieves a file's size.
static boolean File__renameTo(String _old, String _new)
          rename a file.
static String[] startDeTiff(String tiffff, String uniqTmpN, String dotfax)
          Extracts pages from a TIFF-F file.
static void startUpFax()
          Starts tha Fax stack up.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DotFax

public static final String DotFax
See Also:
Constant Field Values
Method Detail

startDeTiff

public static final String[] startDeTiff(String tiffff,
                                         String uniqTmpN,
                                         String dotfax)
                                  throws InterruptedException,
                                         IOException
Extracts pages from a TIFF-F file. Created files will be named 0, ... N-1. There maybe be NO files if conversion fails. Common conversion failures : package HPOX Imaging not/no longer installed (often on HPUX). TIFF file structure not restricted to TIFF-F format, use tiffinfo to know. Color, motion, exotic widths and lengths are not supported. This is the 1st step a 3 step scenario : first, before placing the outgoing call, extract fax pages from TIFF container with startDeTiff(). this takes some time (can be quite long on HPUX, e.g. more than ten seconds !). then, if at least one page, after loopCP() and TRUNK_LEG_CONNECTED, retrieve page details with completeDeTiff(). last, once Fax completed with q_Document or an error, cleanup temporary files with cleanUpAfterDeTiff().

Parameters:
tiffff - the pathname to a TIFF-F file.
uniqTmpN - the left part of the pathnames of the individual fax pages to be extracted from the TIFF-F file.
dotfax - the right part of the individual fax page pathnames. Should end with ".fax".
Throws:
InterruptedException
IOException
Since:
OCMP 2.4 C2

completeDeTiff

public static final void completeDeTiff(String tiffff,
                                        String[] pre_detiffed_pages,
                                        Dictionary _faxParams)
Note : this is the Oclet responsibility to remove these files.

Since:
OCMP 2.4 C2

File__delete

public static final void File__delete(String tmp)
                               throws Exception
remove a file. meant to workaround a known JVM bug.

Throws:
Exception
Since:
OCMP 2.4 C2

File__renameTo

public static final boolean File__renameTo(String _old,
                                           String _new)
rename a file. meant to workaround a known JVM bug.

Since:
OCMP 2.4 C2

File__exists

public static final boolean File__exists(String tmp)
                                  throws Exception
checks a file exists. meant to workaround a known JVM bug.

Throws:
Exception
Since:
OCMP 2.4 C2

File__length

public static final int File__length(String tmp)
retrieves a file's size. meant to workaround a known JVM bug.

Since:
OCMP 2.4 C2

File__exists_and_isDirectory

public static final boolean File__exists_and_isDirectory(String tmp)
checks a directory exists. meant to workaround a known JVM bug.

Since:
OCMP 2.4 C2

cleanUpAfterDeTiff

public static final void cleanUpAfterDeTiff(String[] pageArray)
remove temporary fax files created by startDeTiff().

Since:
OCMP 2.4 C2

startUpFax

public static final void startUpFax()
Starts tha Fax stack up.

Since:
OCMP 2.4 C2