com.digertech.sdk.writer
Class DTFileWriter

java.lang.Object
  extended by com.digertech.sdk.writer.DTFileWriter

public final class DTFileWriter
extends java.lang.Object

Class DTFileWriter create a new ICL file and write the ICL records to the file.

Class DTFileWriter is part of DigerTech Inc. file processing SDK. License key is required to performance the process. For each JVM, the method setLicenseKey should be called one and only one time which will validate the license key.

If the license key is valid, DTFileWriter returns the valid product id of the license. Othwise a free version product id is returned. The following are all valid product id:

SDK_FREE
SDK_FILE_WRITER_DEVELOPER
SDK_FILE_WRITER_ENTERPRISE_I
SDK_FILE_WRITER_ENTERPRISE_II

After the ICL file is processed, the method close should be called to close the ICL file.


Field Summary
static int SDK_FILE_WRITER_DEVELOPER
           
static int SDK_FILE_WRITER_ENTERPRISE_I
           
static int SDK_FILE_WRITER_ENTERPRISE_II
           
static int SDK_FREE
           
 
Constructor Summary
DTFileWriter(java.io.File file)
          Constructs a newly allocated DTFileWriter that represents the Image Cash Letter file writer.
DTFileWriter(java.io.File file, boolean ebcdic, boolean bigEndia)
          Constructs a newly allocated DTFileWriter that represents the Image Cash Letter file reader.
 
Method Summary
 void close()
          Close the Image Cash Letter file.
static FPLicenseInfo getLicenseInfo()
          If a license key is set to the SDK and the license key is valid, the license info will be return after it is validated.
static int setLicenseKey(java.lang.String licenseKey)
          Set the license key to the SDK to validate the license.
 void writeRecord(X9Record record)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SDK_FREE

public static final int SDK_FREE
See Also:
Constant Field Values

SDK_FILE_WRITER_DEVELOPER

public static final int SDK_FILE_WRITER_DEVELOPER
See Also:
Constant Field Values

SDK_FILE_WRITER_ENTERPRISE_I

public static final int SDK_FILE_WRITER_ENTERPRISE_I
See Also:
Constant Field Values

SDK_FILE_WRITER_ENTERPRISE_II

public static final int SDK_FILE_WRITER_ENTERPRISE_II
See Also:
Constant Field Values
Constructor Detail

DTFileWriter

public DTFileWriter(java.io.File file)
             throws FileIOException
Constructs a newly allocated DTFileWriter that represents the Image Cash Letter file writer.

Parameters:
file - the image cash letter file.
Throws:
FileIOException - if there is an error initialize the file writer.

DTFileWriter

public DTFileWriter(java.io.File file,
                    boolean ebcdic,
                    boolean bigEndia)
             throws FileIOException
Constructs a newly allocated DTFileWriter that represents the Image Cash Letter file reader.

Parameters:
file - the image cash letter file.
ebcdic - the image cash letter file data encode format is EBCDIC.
bigEndia - the image cash letter file byte order is big endia.
Throws:
FileIOException - if there is an error initialize the file writer.
Method Detail

close

public void close()
           throws FileIOException
Close the Image Cash Letter file. This method should be called after all records are written into the file.

Throws:
FileIOException - if there is an error closing the file.

writeRecord

public void writeRecord(X9Record record)
                 throws FileIOException
Throws:
FileIOException

setLicenseKey

public static int setLicenseKey(java.lang.String licenseKey)
Set the license key to the SDK to validate the license. If the license key is valid, a valid product id of the license will be returned. Othwise a free version productId is returned. The following are all valid product id:

SDK_FILE_WRITER_DEVELOPER
SDK_FILE_WRITER_ENTERPRISE_I
SDK_FILE_WRITER_ENTERPRISE_II


getLicenseInfo

public static FPLicenseInfo getLicenseInfo()
If a license key is set to the SDK and the license key is valid, the license info will be return after it is validated. The license info contains product id of if the license is valid. Othwise a free version productId is returned. The following are all valid product id:

SDK_FILE_PROCESS_DEVELOPER
SDK_FILE_PROCESS_ENTERPRISE_I
SDK_FILE_PROCESS_ENTERPRISE_II