Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7068811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:22:10+00:00 2026-05-28T05:22:10+00:00

I want my Java application to download CSV files from http://www.nasdaqomxbaltic.com/ for example or

  • 0

I want my Java application to download CSV files from http://www.nasdaqomxbaltic.com/ for example or any other site that offers data files.

How can I tell my java application to change from and to values before downloading a csv file?

The following is form for choosing date range : http://www.nasdaqomxbaltic.com/market/?pg=charts&idx_main%5B%5D=OMXBBGI. There are default from and to values assigned by website at the moment and I get CSV file including data between default from and to date.

Could you suggest any java library that can change from and to values in order to download csv file including only particular date range?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:22:10+00:00Added an answer on May 28, 2026 at 5:22 am

    First, you can direct search by date with the following URL :

    http://www.nasdaqomxbaltic.com/market/?pg=charts&lang=en&idx_main%5B%5D=OMXBBGI&add_index=OMXBBPI&add_equity=LT0000128266&period=6months&start_d=19&start_m=7&start_y=2011&end_d=19&end_m=1&end_y=2012
    

    where you can give the wanted date values to these parameters:

    ex :start_d=19&start_m=7&start_y=2011&end_d=19&end_m=1&end_y=2012
    

    Then the idea is to get the rendered web page. Here, you can use the Jsoup library like this :

    Document doc = Jsoup.connect("http://www.nasdaqomxbaltic.com/market/?pg=charts&lang=en&idx_main%5B%5D=OMXBBGI&add_index=OMXBBPI&add_equity=LT0000128266&period=6months&start_d=19&start_m=7&start_y=2011&end_d=19&end_m=1&end_y=2012").get();
    Elements csvLinkFiles= doc.select("div.download > a");
    int filesCounter = 0;
    for (Element link : csvLinkFiles) {
        String href = link.attr("href");
        URL csvFileLink= new URL(href);
        ReadableByteChannel rbc = Channels.newChannel(csvFileLink.openStream());
        FileOutputStream fos = new FileOutputStream("csv-file-"+ (++filesCounter) + ".csv");
        fos.getChannel().transferFrom(rbc, 0, 1 << 24);
    }
    

    I’m not sure about the code, but the idea is here.

    EDIT :

    After performing a little request, it seems that you have to perform an HTTP Get (because the file is not static and is returned on request).

    Here is a little piece of code that should replace all the code below the URL csvFileLink= new URL(href) line :

    GetMethod get = new GetMethod(href);
    InputStream in = get.getResponseBodyAsStream();
    File file=new File("csv-file-"+ (++filesCounter) + ".csv");
    OutputStream out = new FileOutputStream(file);
    int read = 0;
    byte[] bytes = new byte[1024];
    while ((read = inputStream.read(bytes)) != -1) {
        out.write(bytes, 0,  read);
    }
    in.close();
    out.flush();
    out.close();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am scraping data from web site using my java application and want to
We want to be able to create log files from our Java application which
I do not want my Java SWT application to cache temporary internet files. Currently
On one of our Java application screens, we want to display data loaded from
How to get money from users phone using Java application? So I want to
I want to create a PHP/Java application that would be able to download videos
I want to use one or many script languages in my Java application. From
I want to create a Java application bundle for Mac without using Mac. According
In a Java application I want to be able to take a timestamp at
I have a Java application which I want to shutdown 'nicely' when the user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.