Results 1 to 8 of 8
  1. #1
    ganeshsalian is offline Member
    Join Date
    Jul 2007
    Posts
    5
    Rep Power
    0

    Smile Download Tracking

    Hi ,

    I am downloading some files through Servlet. I want to track whether the download got completed or not through servlet.

    Is there any way that i can track the downloads, whether download broke in between because of network issue or if use cancelled the download etc..

    Help me out in this regard.

    Thanks
    Ganesh.

  2. #2
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    10

    Default

    You will need to read data from a thread. This thread will read the file from a port just like you did for a regular file. And while reading it will use a buffer. In this setting, you can count the bytes read and use that information for tracking.

    And since you are writing downloading code yourself (as far as i see), you can just catch an exception when a network/IO exception occurs.

  3. #3
    ganeshsalian is offline Member
    Join Date
    Jul 2007
    Posts
    5
    Rep Power
    0

    Default Download

    Thanks for ur reply.

    Presently we are redirecting the download url. No specific download code written.

    Do you have any snippet of code which use to download the file.

    Thanks,

    Ganesh..

  4. #4
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    10

    Default

    Hi Ganesh,

    I guess this example will help you a lot since all you need is there ;) :

    Java Tips - How to create a download manager in Java

  5. #5
    ganeshsalian is offline Member
    Join Date
    Jul 2007
    Posts
    5
    Rep Power
    0

    Default

    Thanks...I will try this out..

  6. #6
    ganeshsalian is offline Member
    Join Date
    Jul 2007
    Posts
    5
    Rep Power
    0

    Default Download Tract

    We tried the example. Data is getting buffered.

    We want to track the download from the Web. We want to track whether user has completed the download process. How can we fullfil our requirement using this. Is there any seperated solution available.

    Pls suggest.

    Thanks

  7. #7
    levent Guest

    Default

    I did not understand your problem with the example given. What is missing there? It is a Java code which means you can use it in any Java application/applet including a web application.

  8. #8
    ganeshsalian is offline Member
    Join Date
    Jul 2007
    Posts
    5
    Rep Power
    0

    Default Download

    Hi,

    We have given download option in our site. Normally when user clicks on download, we get save as dialoge box which is browser rendered. When user clicks on save, it is will start downloading, In between if user cancels the operation or if there is any network issue, Here we want to track whether download is been completed or not.

    Pls suggest.

    Thanks..

Similar Threads

  1. Download JDK 1.5
    By Nick15 in forum New To Java
    Replies: 4
    Last Post: 01-01-2009, 03:10 AM
  2. What jdk do I download?
    By padutch2 in forum New To Java
    Replies: 3
    Last Post: 11-29-2007, 04:28 AM
  3. Tracking Operating System
    By Mansi in forum Networking
    Replies: 2
    Last Post: 07-23-2007, 01:41 PM
  4. Track download
    By nilesh.malode in forum Advanced Java
    Replies: 1
    Last Post: 07-13-2007, 09:44 PM
  5. I could download JDK 1.5
    By Albert in forum New To Java
    Replies: 2
    Last Post: 07-13-2007, 03:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •