FTP Alternativ​e for downloadin​g 50mb files

I need to transfer 50mb binary data files from a crio to a pc over a celluar modem. I have implemented the FTP file transfer but for some reason FTP is moving really slow. Whether its the service provider throttling the transfer rate on the port, we are not sure.
I was wondering if there are any other ways to send files with LabVIEW. I don't have much experience with HTTP functions like HTTP GET  and I am not sure if that is even applicable here. The internet tool kit doesnt seem to have an HTTP Get function like it does for FTP. I have heard rumors with an OpenG solution but I have not been able to locate it and I would rather use labVIEW functions/toolkits first before going that route (for collaborative maintainability of code).
If there are other solutions, how do they work? Are they easy to set up? Do you have an example VI?
Thanks in advance.
[will work for kudos]

What kind of cellular modem do you have? What is the data service your provider allows? There are various systems, network provider plans and more.
As I don't know where you are I can't give you specifics but here in Europe you have basically at least 4 different levels of mobile network data communication speed:
GPRS (GSM): (CS1: 9kb - CS4:21.4kb/s)
EDGE (GSM): (theoretically up to 128kb/s)
UMTS (384 Kb/s, and a maximum of 2Mb/s for a single application only)
HSDPA (UMTS): (3.6 and 7.2 Mb/s)
LTE (long term evolution and as the name indicates still mostly just vaporware, theoretically up to 100Mb/s)
Note that these datarates are all in bits/per seconds, and usually not fully usable due to network congestion. And they are also raw channel throughput. Any protocol such as TCP/IP does have a considerable overhead that will reduce the maximum possible netto data throughput further.
FTP is indeed not an ideal protocol to transmit a large number of files efficiently through limited throughput channels, but for a single file transfer the additional overhead should be not to bad.
But the first question is to find out what data rate service and plan you are using. Most industrial cellular modems nowadays still work on the GSM or equivalent level and therefore use data services such as GPRS and there you simply can't go higher than about 2 k Bytes per second.
Higher throughput services such as EDGE are not supported on all GSM networks and not by all modems. And if you want to go even higher than that, you need an entirely new type of modem and network based on the still not widely used UMTS or equivalent technology.
Rolf Kalbermatter
Message Edited by rolfk on 10-09-2009 09:06 AM
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • FTP List search for file in XI JavaMapping

    I wonder if anyone has ever done a JavaMap in XI with a FTP List search for e.g. filename*.xml
    With the standard FTP URLstring there is no ‘*’ possible within the filename.
    I have not found any documentation on this, how to do a FTP search for filename*.xml within a JavaMap.
    This JavaMap works fine for picking up a file with the exact filename:
    Do you know how to change the code to do this FTP list?
    Thanks for any hints,
    Phil
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import java.io.*;
    import java.util.*;
    import java.net.*;
    public class XIftpClient  implements StreamTransformation {
                private Map myParam;
                public void setParameter(Map param) {
                      myParam = param;
                public void execute(InputStream in, OutputStream out) throws StreamTransformationException {
                      URL url = null;
                      URLConnection urlc = null;
                      InputStream ftpInputStream = null;
                      // read xml into String
                      int b = 0;
                      String xml = "";
                      while (b!=-1) {
                            try {
                                  b = in.read();
                                  if (b!=-1) {
                                        xml = xml + new
    Character((char)b).toString();
                            } catch (IOException e) {
                                  throw new
    StreamTransformationException("Exception during Java Mapping." , e);
                      // read properties from xml
                      String user;
                      String password;
                      String host;
                      String filename;
                      String path;
                      String urlString;
                      user = getValueByTagName(xml,"username");
                      password = getValueByTagName(xml,"password");
                      host = getValueByTagName(xml,"host");
                      path = getValueByTagName(xml,"path");
                      filename = getValueByTagName(xml,"filename");
                      urlString =
    "ftp://"user":"password"@"hostpathfilename";type=i";
                      // get file from FTP
                      try {
                            url = new URL(urlString);
                      } catch (MalformedURLException e) {
                            throw new
    StreamTransformationException("Exception formatting URL." , e);
                      try {
                            urlc = url.openConnection();
                            ftpInputStream = urlc.getInputStream(); // To download
                      } catch (IOException e) {
                            throw new StreamTransformationException(
    "Exception reading file from FTP.\n"+e.toString(),e);      
                      // read file into String
                      b = 0;
                      StringBuffer file = new StringBuffer();

    well, i think the best solution would be make a recursive search through the directory tree. I don't know if you are familiar to this, but the functions that searches for the file would look like this:
    public String searchFile(String name) {
      File[] roots = File.listRoots();   // List all file roots (in windows the different units, c:, d:, etc.)
      for (int i = 0 ; i < roots.length() ; i++) {
        String aux = recursiveSearch(roots, name);
    if (aux != null) {   // If the "recursiveSearch" returns something different than null is that the file is founded, so we return the path.
    return aux;
    return null; // If we get there nothing has been found
    private String recursiveSearch(File f, String name) {   // f is the directory to search for the file with name "name"
    File[] childs = f.listFiles();
    for (int i = 0 ;i < childs.length ; i++) {
    if (childs[i].isDirectory()) {  // If that is a directory we search inside
    String aux = recursiveSearch(childs[i], name);
    if (aux != null) {   // We have found it inside this directory
    return aux;
    } else {  // Is a regular file
    if (name.compareTo(childs[i].getName()) == 0) {   // If the file is what we want we return his path
    return childs[i].getCanonicalPath();
    // If we get here is because the file is not inside the directory or any subdirectory on it
    return null;
    You should just call the function searchFile(name) with the name of the file you want to search. If it finds one with this name it will return his absolute path, and if he doesn't the desired file he will return null.
    If you don't understand anything just ask.
    (Note: i have not tested this code, so can be some mistakes, but it think it is almost correct. mmmhh don't now why, but [ & ] appear in my code as < & >. Just replace them.).
    Hope that helps.
    Zerjio

  • Receiver FTPS (Explicit) channel giving error while writing files.

    Hi All,
    We are facing an issue while using FTPS for writing a file to a partner location. Since this is the first time we are using FTPS, we went through some blogs and notes to configure the same, but still facing problems. Listed below are the steps undertaken for the configuration:
    1. Got necessary ports opened on the firewall (the partner FTPS site uses explicit FTPS with control commands on port 21 and data on some custom ports).
    2. Tested file transfer on FTPS using some FTPS client tools from the PI 7.11 server being used.
    3. Uploaded the server SSL certificates in the NWA Keystore, Trusted CA view in both Base64 and normal formats (all certificates in the chain uploaded).
    4. Configured the FTPS receiver channel for the CN name mentioned in the certificate, port 21, directory specified, NO X.509 client authentication (as that is not needed), AUTH TLS, USER,PASS,PBSZ,PROT as command order and using some authentication (user ID, Pwd for logging in). 
    But we are still getting the error:
    'An error occurred while connecting to the FTP server 'xxxxxx.xxx.com:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 Access denied.'. For details, contact your FTP server vendor..'
    On the partner side we could not find any logs and from PI too we are not getting any more details than mentioned above. CAn some let us know any known resolutions to the issue or how to get more details from the trace in PI (we have already increased the trace level of the file adapter to error but nothing more useful is available in Java default trace than mentioned above).
    Appreciate any help extended towards this.
    Thanks in advance,
    Avishek.
    Edited by: Avishek Gorai on Feb 21, 2011 8:50 AM

    Thank you all for your answers. I want to bring to your notice that the file transfer (using FTPS) is still working using commercially available FTP client tools from the PI server. So in my opinion issues like OS user not having authorization, incorrect user credentials and firewall issues are ruled out. We are facing issue only when using PI adapter for file transfer, this could be due to incorrect commands or command sequence being sent to the Server etc. which the server is rejecting and giving an unauthorized error.
    We also tested this by giving incorrect pwd OR changing the command sequence, in which case the errors thrown were more specific and appropriate (like incorrect credentials OR AUTH TLS command missing).
    The strange thing is that things work from the PI server when using FTP tools, but fails from PI adapters, which makes me feel there is some issue with the protocol or the setup.
    Also please let me mention that we have ensured Java cryptographic toolkit is installed on the PI system being used.

  • FTP Receiver Adapter is completly ignoring the file content conversionurn..

    Hi,
    i'm picking up a flat file using the NFS adapter, the payload in the message monitoring looks like this:
    <?xml version="1.0" encoding="utf-8" ?>
    <ns:MT_FILE xmlns:ns="urn:......">
    <Record>
    <Line>100221120100000000000000</Line>
    <Line>100221120100000000000000</Line>
    </Record>
    </ns:MT_FILE>
    I'm now writing this to an ftp server, message protovol is set to File Content Conversion and the conversion parameters are set to this:
    Line.addHeaderLine     1
    Line.fieldSeparator     #
    Record.fieldContentFormatting     nothing
    Line.fieldContentFormatting     nothing
    Record.fieldSeparator     *
    looks realy weired and is not really what is needed but i changed the parameters dramatically, but none of those conversion parameters are taken in effect.
    The resulting files always looks the same, nor do i get a header line nor do i get the "weired" newline characters. i'm alway getten nl/0X0A as line separator.
    What do i miss?

    > You need to do content conversion for the nodes, not for the recordset.Remove Record conversion parameters and try.
    This is wrong. It is the other way:
    Use parameter
    Record.addHeaderLine     1
    When you want to have a different end-of-line cjaracter, you have to use the correct parameter
    Record.endSeparator
    Sometimes it really helps to look in online help.

  • External Table for Variable Length EBCDIC file with RDWs

    I am loading an ebcdic file where the record length is stored in the first 4 bytes. I am able to read the 4 bytes using the db's native character set, ie;
    records variable 4
    characterset WE8MSWIN1252
    data is little endianBut I have to then convert each string column individually on the select, ie;
    convert(my_col, 'WE8MSWIN1252', 'WE8EBCDIC37')If I change the character set to ebcdic;
    records variable 4
    characterset WE8EBCDIC37
    data is little endianI get the following error reading the first 4 bytes;
    ORA-29913: error in executing ODCIEXTTABLEFETCH callout
    ORA-29400: data cartridge error
    KUP-04019: illegal length found for VAR record in file ...We can not use the ftp conversion as the file contains packed decimals.
    There are other options for converting the file but I am wondering if was able to get an external table to read a native ebcdic file without a pre-process step.

    I am loading an ebcdic file where the record length is stored in the first 4 bytes. I am able to read the 4 bytes using the db's native character set, ie;
    records variable 4
    characterset WE8MSWIN1252
    data is little endianBut I have to then convert each string column individually on the select, ie;
    convert(my_col, 'WE8MSWIN1252', 'WE8EBCDIC37')If I change the character set to ebcdic;
    records variable 4
    characterset WE8EBCDIC37
    data is little endianI get the following error reading the first 4 bytes;
    ORA-29913: error in executing ODCIEXTTABLEFETCH callout
    ORA-29400: data cartridge error
    KUP-04019: illegal length found for VAR record in file ...We can not use the ftp conversion as the file contains packed decimals.
    There are other options for converting the file but I am wondering if was able to get an external table to read a native ebcdic file without a pre-process step.

  • I mistakenly saved a download, and checked the "always do this for thid type of file" now I cannot open a file without saving it first, because it does not take me to that same dialog box.

    When you open a file from an email, you get a dialog box Open or Save this file. I wanted to save a particular file, so I clicked Save. The problem is, I had already clicked on "do this every time for files like this" so now it won't give me the dialog box back for when I just want to open a file, not save it. I have searched Options, to no avail.

    '''''"always do this for thid type of file"''''' means exactly what it says: '''<u>always</u>''' .
    Go to Tools > Options > Applications, locate and click on the Content Type for the item, change Action to "Always ask". This will cause a dialog to open giving you a choice of opening with an appropriate plugin for Firefox or saving the item to your hard drive. See:
    *http://support.mozilla.com/en-US/kb/Managing+file+types
    *http://kb.mozillazine.org/File_types_and_download_actions
    '''Other issues needing your attention'''
    The information submitted with your question indicates that you have out of date plugins with known security and stability issues that should be updated. To see the plugins submitted with your question, click "More system details..." to the right of your original question post. You can also see your plugins from the Firefox menu, Tools > Add-ons > Plugins.<br />
    <br />
    *Adobe PDF Plug-In For Firefox and Netscape "9.4.1"
    **'''''Security update version 9.4.2 released on 2011-02-08'''''
    **Info on version 10 (Reader X)"
    ***New Adobe Reader X (version 10) with Protected Mode was released 2010-11-19
    ***See: http://www.securityweek.com/adobe-releases-acrobat-reader-x-protected-mode
    *Shockwave Flash 10.1 r102
    **'''''Security update version 10.2.152.26 released on 2011-02-08'''''
    *Next Generation Java Plug-in 1.6.0_23 for Mozilla browsers
    **'''''Security update version 1.6.0_24 released on 2011-02-10'''''
    #'''Check your plugin versions''': http://www.mozilla.com/en-US/plugincheck/
    #*'''Note: plugin check page does not have information on all plugin versions'''
    #'''Update Adobe Reader (PDF plugin):'''
    #*From within your existing Adobe Reader ('''<u>if you have it already installed</u>'''):
    #**Open the Adobe Reader program from your Programs list
    #**Click Help > Check for Updates
    #**Follow the prompts for updating
    #**If this method works for you, skip the "Download complete installer" section below and proceed to "After the installation" below
    #*Download complete installer ('''if you do <u>NOT</u> have Adobe Reader installed'''):
    #**Use the links below to avoid getting the troublesome "getplus" Adobe Download Manager and other "extras" you may not want
    #**Use Firefox to download and SAVE the installer to your hard drive from the appropriate link below
    #**Click "Save to File"; save to your Desktop (so you can find it)
    #**After download completes, close Firefox
    #**Click the installer you just downloaded and allow the install to continue
    #***Note: Vista and Win7 users may need to right-click the installer and choose "Run as Administrator"
    #**'''<u>Download link</u>''': ftp://ftp.adobe.com/pub/adobe/reader/
    #***Choose your OS
    #***Choose the latest #.x version (example 9.x, for version 9)
    #***Choose the highest number version listed
    #****NOTE: 10.x is the new Adobe Reader X (Windows and Mac only as of this posting)
    #***Choose your language
    #***Download the file, SAVE it to your hard drive, when complete, close Firefox, click on the installer you just downloaded and let it install.
    #***Windows: choose the .exe file; Mac: choose the .dmg file
    #*Using either of the links below will force you to install the "getPlus" Adobe Download Manager. Also be sure to uncheck the McAfee Scanner if you do not want the link forcibly installed on your desktop
    #**''<u>Also see Download link</u>''': http://get.adobe.com/reader/otherversions/
    #**Also see: https://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox (do not use the link on this page for downloading; you may get the troublesome "getplus" Adobe Download Manager (Adobe DLM) and other "extras")
    #*After the installation, start Firefox and check your version again.
    #'''Update the [[Managing the Flash plugin|Flash]] plugin''' to the latest version.
    #*Download and SAVE to your Desktop so you can find the installer later
    #*If you do not have the current version, click on the "Player Download Center" link on the "'''Download and information'''" or "'''Download Manual installers'''" below
    #*After download is complete, exit Firefox
    #*Click on the installer you just downloaded and install
    #**Windows 7 and Vista: may need to right-click the installer and choose "Run as Administrator"
    #*Start Firefox and check your version again or test the installation by going back to the download link below
    #*'''Download and information''': http://www.adobe.com/software/flash/about/
    #**Use Firefox to go to the above site to update the Firefox plugin (will also install plugin for most other browsers; except IE)
    #**Use IE to go to the above site to update the IE ActiveX
    #*'''Download Manual installers'''.
    #**http://kb2.adobe.com/cps/191/tn_19166.html#main_ManualInstaller
    #**Note separate links for:
    #***Plugin for Firefox and most other browsers
    #***ActiveX for IE
    #'''Update the [[Java]] plugin''' to the latest version.
    #*Download site: http://www.oracle.com/technetwork/java/javase/downloads/index.html (Java Platform: Download JRE)
    #**'''''Be sure to <u>un-check the Yahoo Toolbar</u> option during the install if you do not want it installed.
    #*Also see "Manual Update" in this article to update from the Java Control Panel in Windows Control Panel: http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates
    #* Removing old versions (if needed): http://www.java.com/en/download/faq/remove_olderversions.xml
    #* Remove multiple Java Console extensions (if needed): http://kb.mozillazine.org
    #*Java Test: http://www.java.com/en/download/help/testvm.xml

  • FTP to Read content of Text/xml file

    Hi,
    I need a help for reading content of text/xml file through FTP. Below I just am explaining the scenario.
    Our application server is in UNIX. Now we have to run a report program to access in to a FTP server which is in windows platform. Using FTP_CONNECT, FTP_COMMAND, FTP_DISCONNECT we are able to connect to FTP server and also able to copy files from FTP server to SAP application server. After copied in application server, we are able to read the content of the txt file in to internal table in ABAP program using OPEN DATASET. But our requirement is that we want to read the text or xml file content into internal table while accessing into FTP server from SAP application instead of after copying the file into application server.
    So please help me to solve my problem.
    -Pk

    Thank you Bala,
    But can you help me what should I pass against FNAME and CHARACTER_MODE Import parameter? Should I pass the full path of the file with name or only I have to pass file name ? For example if my text file name in FTP Server is test.txt and the IP of the ftp server is 10.10.2.3 then should I pass the value against FNAME as '
    10.10.2.3\xyz\text.txt' ? Here xyz is the name of the directory in C drive where test.txt is exist.
    Please help me.
    -pk

  • FTP: how to get total number of files in directory

    Hello Folks,
    I prefer to use FTP from the command line but cannot figure out how--after having connected to a remote directory via ftp--to list the total number of files in that directory.
    In Unix, I would do this:
    % ls | wc -l
    But hopefully there is also some way in FTP to do the same--but darned if I know how! I do see that FTP clients such as Transmit have this listing, but maybe that's a feature of the software and not ftp.
    Thanks in advance for any suggestions/tips.
    Doug

    I've done a lot of ftp scripts 10 years ago, mostly because I could not guarantee my scripted telnet would be available everywhere. The best answer today though is listed throughout this thread and that is to use the ssh family of commands that include ssh for secure remote shell, scp for secure remote copy and sftp which is the ftp interface to scp.
    My point is neither telnet or ftp are considered safe or secure anymore because listening to communications is popular, it is referenced in most "wizard" magazines, and usernames and passwords are not encrypted.
    Set up your environment first with ssh-keygen. Version 2 is more secure than version 1 if both are still offered. Then use "ssh user@hostname ls | wc -l" to get your number of files. It is simple execution with one command and returns a status.
    If you are really looking for a solution using what you are familar with and want to ignore advice concerning security, here is a sample batch script (untested). You can change the filenames, usernames, and hostnames as desired.
    rm dir.out 2> /dev/null
    echo "user sampleuser samplepw" > script.ftp
    echo "dir sampledirectory dir.out" >> script.ftp
    echo "quit" >> script.ftp
    ftp -n sample.hostname < script.ftp
    if [ ! -r dir.out ] # file not created
    then
    echo login failed
    elif [ ! -s dir.out ] # file created but empty
    then
    echo directory is empty
    else
    nf=`wc -l dir.out | cut -f1`
    echo "There are $nf files in the directory"
    fi

  • How can I enable FTP on the DMP and How can I FTP to it and then remove the files that were deployed to the DMP flash?

    How can I enable FTP on the DMP and How can I FTP to it and then remove the files that were deployed to the DMP flash? My platform of DMS is 5.2.2

    Hi Temur, ok. I do the above procedure and it worked fine
    Now, I have other question?
    How can I reproduce any file (for example: a video, an url page, an image), that is in the flash of DMP?
    Índice de ftp://172.17.15.22/tmp/ftproot/tmp/ftproot/tmp/ftproot/usb_1/
    Subir al directorio superior.
    Nombre Tamaño Última modificación
    Sample Videos.lnk
    1 KB
    17/06/2011
    06:25:00 a.m.
    deployment
    29/06/2010
    04:14:00 a.m.
    lost+found
    25/02/2010
    12:00:00 a.m.
    video futbol en la playa.mp4
    1390 KB
    29/06/2010
    01:08:00 a.m.
    videofutbol.mp4
    1390 KB
    29/06/2010
    01:38:00 a.m.
    I like, that el DMP when loss conectivity with DMM, It display at the LCD screen, the video named videofutbol.mp4, this video As I show in the picture above, already in the flash of DMP.
    I appreciate your early response.
    Thanks

  • How does one change the font size for folders and/or file lists in the Bookmarks Library?

    How does one change the font size for folders and/or file lists in the '''Bookmarks''' Library?
    Since the upgrade to version 9.0.1 of Firefox, the Bookmarks feature changes are confusing me. They seem to be confusing themselves as well. The list of bookmarks has changed. The font size is so small that my aging eyes cannot read it without fogging the screen with my breath. Some folders are out of alphabetical order (where I know they were previously good), and some are missing altogether (folders to which I frequently add references).
    As for missing or deranged files or folders, was there something that I should have done or now need to do to recover those after the upgrade (or before)?
    With regard to font size,
    1. there is no “Edit Bookmarks” or like option to edit the list in this version
    2. the “zoom” option in the “view” list of functions is greyed out when in “Show All Bookmarks” window
    3. expanding the browser window has no effect on font size
    4. “Preferences” settings for font size has no effect in that window either, including advanced settings
    5. “Help” offers none that I can find.
    Can any of you Help?!?

    Maybe this extension helps:
    *Theme Font & Size Changer: https://addons.mozilla.org/firefox/addon/theme-font-size-changer/

  • The operation can't be completed because some items had to be skipped. For each item, choose File Get Info, make sure "Locked" is deselected, and then check t

    The following error comes up when I try to install the updated Firefox:
    "The operation can’t be completed because some items had to be skipped. For each item, choose File > Get Info, make sure “Locked” is deselected, and then check the Sharing & Permissions section. When you are sure the items are unlocked and not designated as Read Only or No Access, try again."
    When I follow the instructions in the error message, it shows that my user name has read and write access. There are a couple other items that are read only. I tried to change this to read and write, but the Sharing and Permissions options are greyed out and will not let me change them. What is the work around for this? I would really like to install the new firefox.
    Thanks.

    Hello,
    Certain Firefox problems can be solved by performing a ''Clean reinstall''. This means you remove Firefox program files and then reinstall Firefox. Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu).
    #Delete the Firefox installation folder, which is located in one of these locations, by default('''This will NOT delete profile info such as bookmarks and history'''):
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    Please report back to see if this helped you!
    Thank you.

  • Encryption/Decryption  failure for pdf and MSWord files

    Hi,
    Is there anybody to help me to find out what is wrong with my class (listing below)? I am sucessfuly using this class to encrypt and decrypt txt, html files but for unknown reasons I am unable to use it for e.g. pdf files. The encrypion somehow works but any atempt to decrypt is a failure.
    /* This class accepts an input file, encrypts/decrypts it using DES algorithm and
    writes the encrypted/decrypted output to an output file. DES is used in Cipher
    Block Chaining mode with PKCS5Padding padding scheme. Note that DES is a symmetric
    block cipher that uses 64-bit keys for encryption. A password of length no less
    than 8 is to be passed to the encryptFile/ decryptFile methods. This password is
    used to generate the encryption key. All exception handling is to be done by
    calling methods. These exceptions are thrown by encryptFile/ decryptFile methods.
    The input buffer is 64 bytes, 8 times the key size.
    import java.io.*;
    import javax.crypto.*;
    import javax.crypto.spec.*;
    import java.security.*;
    import java.security.spec.*;
    public class Crypto
    public Crypto(FileInputStream inStream_, FileOutputStream outStream_)
    fInputStream_ = inStream_;
    fOutputStream_ = outStream_;
    public void encryptFile(String password_) throws InvalidKeySpecException, InvalidKeyException,
    InvalidAlgorithmParameterException, IllegalStateException, IOException, Exception
    DataOutputStream dataOutStream_ = new DataOutputStream(fOutputStream_);
    // key generation
    SecretKey encryptKey_ = createEncryptionKey(password_);
    // Cipher initialization
    Cipher cipher_= Cipher.getInstance(cipherType);
    cipher_.init(Cipher.ENCRYPT_MODE, encryptKey_);
    // write initialization vector to output
    byte[] initializationVector_ = cipher_.getIV();
    dataOutStream_.writeInt(initializationVector_.length);
    dataOutStream_.write(initializationVector_);
    // start reading from input and writing encrypted data to output
    while (true) {
    inputLength_ = fInputStream_.read(input_);
    if (inputLength_ ==-1) break;
    byte[] output_ = cipher_.update(input_, inputOffset_, inputLength_);
    if (output_ != null)
    dataOutStream_.write(output_);
    // finalize encryption and wrap up
    byte[] output_ = cipher_.doFinal();
    if (output_ != null)
    dataOutStream_.write(output_);
    fInputStream_.close();
    dataOutStream_.flush();
    dataOutStream_.close();
    public void decryptFile(String password_) throws IllegalStateException, IOException, Exception
    DataInputStream dataInStream_ = new DataInputStream(fInputStream_);
    // key generation
    SecretKey encryptKey_ = createEncryptionKey(password_);
    // read initialization vector from input
    int ivSize_ = dataInStream_.readInt();
    byte[] initializationVector_ = new byte[ivSize_];
    dataInStream_.readFully(initializationVector_);
    IvParameterSpec ivParamSpec_= new IvParameterSpec(initializationVector_);
    // Cipher initialization
    Cipher cipher_= Cipher.getInstance("DES/CBC/PKCS5Padding");
    cipher_.init(Cipher.DECRYPT_MODE, encryptKey_, ivParamSpec_);
    // start reading from input and writing decrypted data to output
    while (true) {
    inputLength_ = fInputStream_.read(input_);
    if (inputLength_ ==-1) break;
    byte[] output_ = cipher_.update(input_, inputOffset_, inputLength_);
    if (output_ != null)
    fOutputStream_.write(output_);
    // finalize decryption and wrap up
    byte[] output_ = cipher_.doFinal();
    if (output_ != null)
    fOutputStream_.write(output_);
    fInputStream_.close();
    fOutputStream_.flush();
    fOutputStream_.close();
    // the following method creates the encryption key using the supplied password
    private SecretKey createEncryptionKey(String passwd_) throws InvalidKeySpecException,
    InvalidKeyException, NoSuchAlgorithmException
    byte[] encryptionKeyData_ = passwd_.getBytes();
    DESKeySpec encryptionKeySpec_ = new DESKeySpec(encryptionKeyData_);
    SecretKeyFactory keyFactory_ = SecretKeyFactory.getInstance(algorithm_);
    SecretKey encryptionKey_ = keyFactory_.generateSecret(encryptionKeySpec_);
    return encryptionKey_;
    private FileInputStream fInputStream_;
    private FileOutputStream fOutputStream_;
    private final String algorithm_= "DES";
    private final String cipherType= "DES/CBC/PKCS5Padding";
    private byte[] input_ = new byte[64]; // The input buffer size is 64
    private int inputLength_;
    private final int inputOffset_= 0;
    }

    Please can u give me refined code for me///
    at [email protected]
    Hi,
    I found at least one thing wrong. In the decrypt
    method you are reading from 'fInputStream_' rather
    than 'dataInStream'.
    Worked for me on MSWord after changing this!
    Roger
    // start reading from input and writing decrypted
    ted data to output
    while (true) {
    inputLength_ = fInputStream_.read(input_);
    if (inputLength_ ==-1) break;
    byte[] output_ = cipher_.update(input_,
    input_, inputOffset_, inputLength_);
    if (output_ != null)
    fOutputStream_.write(output_);

  • Need to generate a Index xml file for corresponding Report PDF file.

    Need to generate a Index xml file for corresponding Report PDF file.
    Currently in fusion we are generating a pdf file using given Rtf template and dataModal source through Ess BIPJobType.xml .
    This is generating pdf successfully.
    As per requirement from Oracle GSI team, they need index xml file of corresponding generated pdf file for their own business scenario.
    Please see the following attached sample file .
    PDf file : https://kix.oraclecorp.com/KIX/uploads1/Jan-2013/354962/docs/BPA_Print_Trx-_output.pdf
    Index file : https://kix.oraclecorp.com/KIX/uploads1/Jan-2013/354962/docs/o39861053.out.idx.txt
    In R12 ,
         We are doing this through java API call to FOProcessor and build the pdf. Here is sample snapshot :
         xmlStream = PrintInvoiceThread.generateXML(pCpContext, logFile, outFile, dbCon, list, aLog, debugFlag);
         OADocumentProcessor docProc = new OADocumentProcessor(xmlStream, tmpDir);
         docProc.process();
         PrintInvoiceThread :
              out.println("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
                   out.print("<xapi:requestset ");
                   out.println("<xapi:filesystem output=\"" + outFile.getFileName() + "\"/>");
                   out.println("<xapi:indexfile output=\"" + outFile.getFileName() + ".idx\">");
                   out.println(" <totalpages>${VAR_TOTAL_PAGES}</totalpages>");
                   out.println(" <totaldocuments>${VAR_TOTAL_DOCS}</totaldocuments>");
                   out.println("</xapi:indexfile>");
                   out.println("<xapi:document output-type=\"pdf\">");
    out.println("<xapi:customcontents>");
    XMLDocument idxDoc = new XMLDocument();
    idxDoc.setEncoding("UTF-8");
    ((XMLElement)(generator.buildIndexItems(idxDoc, am, row)).getDocumentElement()).print(out);
    idxDoc = null;
    out.println("</xapi:customcontents>");
         In r12 we have a privilege to use page number variable through oracle.apps.xdo.batch.ControlFile
              public static final String VAR_BEGIN_PAGE = "${VAR_BEGIN_PAGE}";
              public static final String VAR_END_PAGE = "${VAR_END_PAGE}";
              public static final String VAR_TOTAL_DOCS = "${VAR_TOTAL_DOCS}";
              public static final String VAR_TOTAL_PAGES = "${VAR_TOTAL_PAGES}";
    Is there any similar java library which do the same thing in fusion .
    Note: I checked in the BIP doc http://docs.oracle.com/cd/E21764_01/bi.1111/e18863/javaapis.htm#CIHHDDEH
              Section 7.11.3.2 Invoking Processors with InputStream .
    But this is not helping much to me. Is there any other document/view-let which covers these thing .
    Appreciate any help/suggestions.
    -anjani prasad
    I have attached these java file in kixs : https://kix.oraclecorp.com/KIX/display.php?labelId=3755&articleId=354962
    PrintInvoiceThread
    InvoiceXmlBuilder
    Control.java

    You can find the steps here.
    http://weblogic-wonders.com/weblogic/2009/11/29/plan-xml-usage-for-message-driven-bean/
    http://weblogic-wonders.com/weblogic/2009/12/16/invalidation-interval-secs/

  • HT201250 I have two external hard drives. One is my Time Machine backup drive.  The other I use for external storage of files (documents, photos, movies, etc).  Can I set Time Machine to backup BOTH my Mac hard drive and my other external hard drive?

    I have two external hard drives. One is my Time Machine backup drive.  The other I use for external storage of files (documents, photos, movies, etc).  Can I set Time Machine to backup BOTH my Mac hard drive and my other external hard drive?

    Yes you can make multiple backups on one hard drive, for example if you’ve 1TB hard drive installed in your PC and you’ve two Mac Machines with 500GB drive each then you just make two backup images with size of 500GB each.
    http://www.halfspot.com/use-your-pc-hard-drive-for-time-machine-backup/

  • Why does placing links in Illustrator now change the "Date Modified" data for all of my files?

    This seems to be a new glitch that started after I installed the latest updates to Illustrator CC (2014) and reoccurs every time on both computers I work on:
    When I choose to place a new image in my Illustrator file and the window opens to let me choose a file to place, the "Date Modified" field of all the files in the folder I'm viewing (except other Illustrator files) quickly changes to the current date and time. This is definitely happening when I'm in Illustrator because when I needed files from a folder that had hundreds of images in it and I was able to select a file quickly, I was able to do so before it had changed the date on all of my files. However, when I needed a file from a folder that had hundreds of images in it but I took a long time to find the image I needed, Illustrator had time to change the date modified on all of my files. This might seem like an unimportant issue because it doesn't actually seem to modify or damage any of my files, but having all of the dates change on my files is a serious problem for my workflow and file management issues. So far, my only work around has been to use back-up image files, but that's not a long term solution and I don't understand why Illustrator should be modifying the dates of my files.
    Is there a setting I can choose somewhere to prevent this problem? If not, is there somewhere I can report this kind of glitch? I'm not sure if I'm using the exact language necessary to get the issue across so please let me know if you have any questions! Thanks!

    iCloud is not compatible with Snow Leopard, that is your problem.
    A quick way out is to purchase Soho Organizer which is compatible, even when running on Snow Leopard, it will correctly handle Contacts and Calendars from iCloud. $100, 2 user license.
    Soho Organizer
    There is a free trial if you want to try it.

Maybe you are looking for