Trying to look for a href links, then pass it as an array, is this right?

import java.awt.*;
import java.awt.event.*;
import java.net.*;
import java.io.*;
import java.applet.Applet;
import java.util.*;
public class ListFiles{
     String httpAddress;
     String Urls[] = new String[10];
     char singleChar;
     int counter = 0;
     public ListFiles(){
     httpAddress = TodSource.getTextField();               
     ReadSource();     
     //TodSource.setLabelProgress("");
     public void ReadSource() {
          URL url;
          BufferedReader input;
          String line;
          StringBuffer buffer = new StringBuffer();
          try{
               url = new URL(httpAddress);
               input = new BufferedReader( new InputStreamReader(url.openStream() ) );
               TodSource.setLabelProgress("Loading...");
               while( ( line = input.readLine() ) != null )
                    buffer.append(line).append('\n');
               input.close();
               LookForLinks(buffer);
          catch(MalformedURLException mal){
               TodSource.setLabelProgress("Invalid URL format.");
          catch(IOException io){
               TodSource.setLabelProgress(io.toString());
     private void LookForLinks(StringBuffer buffer) {
          int compareInt = 0;
          String delimiter = new String("<a href=");
          String stringFromBuffer = buffer.toString();
          StringTokenizer tokens = new StringTokenizer(stringFromBuffer, delimiter, true);
          while(tokens.hasMoreTokens()){
          String link = tokens.nextToken();
          compareInt = link.compareToIgnoreCase(delimiter);
          String letter= null;
               if(compareInt == 0){
               StringReader Reader = new StringReader(link);
                    try{
                    letter = String.valueOf(Reader.read());
                    catch(IOException io){
                    io.toString();
                    if( letter.equals("\"") ){                              
                         try{
                         letter = String.valueOf(Reader.read());
                         catch(IOException io){
                         io.toString();
                         LinkFound(link);
                    }else{
                         LinkFound(link);
               }else{;}
          TodSource.SendArrays(Urls);
     private void LinkFound(String link) {
          StringReader Reader = new StringReader(link);
          String Reading = null;
          StringBuffer UrlBuffer = null;
          try{
          Reading = String.valueOf(Reader.read());
          catch(IOException io){
          io.toString();
          while(Reading != "\"" || Reading != ">")
          UrlBuffer.append(Reading);
          try{
          Reading = String.valueOf(Reader.read());
          catch(IOException io){
          io.toString();
          if(counter<10)
          Urls[counter] = UrlBuffer.toString();
          else{;}
          ++counter;
seems like it compiles but doesnt display right?
my main class has this to receive code
public static String UrlList[] = new String[10];
//bunch of code
public static void SendArrays(String[] Urls){
     UrlList = Urls;     
}

I think everything that you'll need is in the String class.
http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html
indexOf(String str) will return the starting index of a string inside of another string.
so.... "<a href=" is 8 characters long so you find the starting index of the search string inside of the string being searched ok? Then you add 8 to that index and that should put you just after the equals. then make another string to hold the URL temporarily and construct the temp URL string with stringBringSearched.substring(<index of href tag> + 8)
that string may have garbage at the end of it so I will leave it to you to clean that up.
Now your temp URL string is rnow eady to make an actual URL class.

Similar Messages

  • Looking for table that links a PM Reservation to a MM Purchase Requisition

    Looking for table that links a PM Reservation to a MM Purchase Requisition

    Hi,
        Typically the way most SAP systems are configured, there are two scenarios here:
    1. The component reserved in the PM order is item category 'N'. This is a non inventory item and must be directly procured for consumption against the PM order at the point of goods receipt. In this case no reservation is created and instead a requisition is directly created (in table EBAN) and the requisition is account assigned directly to the PM order (in table EBKN - field AUFNR).
    2. The component reserved in the PM order is item category 'L'. In this case no requisition is directly created, instead a reservation is created against the item in stock (in table RESB). If there is sufficient stock of the item already then the item is consumed when it is goods issued to the PM order from stock using MIGO and there is no requisition created. In the event that there is not sufficient stock of the item for the reservations that exist, when MRP is run, a requisition will be created to replenish the stock, but this requisition will not be assigned to a specific PM order as it could be replenishing stock of the item for several reservations which are all for different orders. So in this scenario there is no direct link from the reservation generated by the PM order to the requisition.

  • ERROR when trying to look for the following function in HRMS Responsibility

    hi all,
    Is there a form in HRMS where a person can enter the exchange Rate and the system calculates the Functional currency to any other currency based on those exchange rates entered in that form.
    I loged in as HRMS Super User and in the Navigator i tries to look for form Function as %Exchange%Rate% ,so in the status i am getting as follows:
    FRM-40010: Cannot Read from e:\oracle\appl\pay\11.5.0\forms\US\PAYWSDER.fmx
    please can any one tell me what is the problem and how can i resolve it.
    Thank you
    Chetan

    Hi so where to find this Fmb file as some where in Metalink i read that if we enter the exchange rate in that form it will Transfer the Journal to GL without giving any errors.
    ALso
    Hi hsawwan,
    Thank you!
    u always reply me back soon thanx for ur kind support.
    I appreciate.
    Please can u comment on the senario for my payroll POST as to how can i handle 2 .
    Thanx
    Chetan

  • Looking for a 'view link target source' context menu item

    I'm looking for a 'view link target source' context menu item.
    I often open listings of servers' directories; they can include direct links to code files (*.py , *.pl, etc). When I click them directly, I'm asked to open them with an external editor which is not what I want to do; I want to view those files source inside of Firefox. I currently have to
    # right-click those links,
    # copy link location,
    # type "view-source:" in the Location bar,
    # paste the copied URL,
    # click Go.
    This gets time-consuming with the large amount of URLs I need to open.
    It's not a native feature for Firefox and a search at [http://addons.mozilla.org AMO] didn't come up with anything useful, for me at least.

    Hello,
    particularly, I performed the following steps:
    1. I created a SC in the local repository, which matches the SC of the track.
    2. I moved the exisiting DCs to the SC created in step 1.
    3. Now, I created new DCs in the SC in the track.
    4. I deleted all .project files from the local DCs.
    5. I copied all source files from the local DCs to the new track DCs.
    6. I checked-in these changes to the track.
    Kind regards
    Alexander

  • I cannot transfer movies on my iphone 4s eventhought its mp4 format. it say 1 item could not be sync see itunes for more information. Tried to look for the reset warning on itunes 11.0 but cannot locate it. Help please

    i cannot transfer movies on my iphone 4s eventhought its mp4 format. it say 1 item could not be sync see itunes for more information. Tried to look for the reset warning on itunes 11.0 but cannot locate it. Help please

    Hello eLZhi,
    Thanks for the question, and welcome to Apple Support Communities.
    The following article provides the most relevant information to your question:
    iOS: 'Not enough free space' alert when trying to sync
    http://support.apple.com/kb/TS1503
    Thanks,
    Matt M.

  • I am looking for a download link of photoshop in spanish

    Hello, I am looking for a download link of the trial version of photoshop

    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  13 | 12 | 11, 10 | 9, 8, 7 win | 8 mac | 7 mac
    Photoshop Elements:  13 |12 | 11, 10 | 9,8,7 win | 8 mac | 7 mac
    Lightroom:  5.6| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • I live in Hong Kong, but I am from Seattle WA. When i look for ibooks or itunes my selections are extremely limited. Is this because I'm in a different country?

    I live in Hong Kong, but I am from Seattle WA. When i look for ibooks or itunes my selections are extremely limited. Is this because I'm in a different country?

    For instance; it seems on the net I see that many Tom Clancy books are availbe on ibooks, but i can not just look them up on my phone. along with many other authors. in the Category section, when trying to browse, many of the categories do not contain any authors or titles at all. this goes for many "i" apps.

  • TS3694 I was making the update for my iphone 4s . then he stops. My phone in this time is in the recovery mode and do not take the firmware to open my phone, please can u help me to recover my phone. My current  ios 6.0.1. plese send me some thing that is

    was making the update for my iphone 4s . then he stops. My phone in this time is in the recovery mode and do not take the firmware to open my phone, please can u help me to recover my phone. My current  ios 6.0.1. plese send me some thing that is useful

    Thanks for that 'sberman' - because my iPhone is backed-up to my work computer (only at this stage) I have had to call our IT Department in Adleaide. (4 times this morning). The last guy managed to get the phone into 'DFU Mode' - no more recovery mode screen - (kind of 'asleep' perhaps) from my understanding of same. I am awaiting a call again from IT so they can get my computer to actually recognise my iPhone on the C Drive. This also happened to  one of my colleagues in Newman (WA). She got so frustrated with the whole process that she bought another phone the next time she was in 'civilisation.' She hasn't had any problems since. (Cross fingers).
    Thanks again, Sandra2474.

  • I can hear people on call but sometimes they can't hear me, it maybe fine for afew mins but then sound drops again? Anyone have this problem and find a solution? Thanks.

    I have an Iphone 4 13.5 GB, iOS 7.1.2. Currently when I make a call or someone calls me, I can hear people on call perfectly but sometimes they can't hear me. It maybe fine for afew mins but then sound drops again? Anyone have this problem and find a solution? Thanks.

    I have taken it back to the Apple store genius bar, but they say they don't see anything wrong. Well unless you use it all day and experience the problems when they happen, you wont see anything wrong. But there are lots wrong with it. But this would be the same store as I purchased the phone. And they backed up my old Iphone 4, but were not able to get anything to load back onto my new phone. So, I lost pretty much everything. But over time, some of my contacts have started showing up, although i am still missing over 800 of them.

  • I'm trying to update my lightroom 5 from 5.2 to 5.6 but it states that it cannot find Adobe_Lightroom_X64.msi? I've tried to look for the file but it cannot find it?

    I'm not much of a computer person and when I tried to update the program it wouldn't process it and is looking for the Adobe_Lightroom_X64.msi file.
    Has anybody had the same issue and a possible fix?
    Thank you

    Upgrading to Snow Leopard
    You can purchase Snow Leopard through the Apple Store: Mac OS X 10.6 Snow Leopard - Apple Store (U.S.). The price is $19.99 plus tax. You will be sent physical media by mail after placing your order.
    After you install Snow Leopard you will have to download and install the Mac OS X 10.6.8 Update Combo v1.1 to update Snow Leopard to 10.6.8 and give you access to the App Store. Access to the App Store enables you to download Mountain Lion if your computer meets the requirements.
         Snow Leopard General Requirements
           1. Mac computer with an Intel processor
           2. 1GB of memory
           3. 5GB of available disk space
           4. DVD drive for installation
           5. Some features require a compatible Internet service provider;
               fees may apply.
           6. Some features require Apple’s iCloud services; fees and
               terms apply.

  • HT201406 I cannot get my touchscreen to work not even able to slide to turn on. tried resetting, waited for the apple and then the usb itunes disc/music note appeared then nothing.. is this ipod junk?

    I cannot get my ipod touch touchscreen to wrok not even able to slide to turn on. Ive tried resetting, waited for the applie.. long wait then the USB plug appeared wit Itunes disc/music note then it just stayed there.. is this ipod junk?

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup. See:
    iOS: How to back up
    - Restore to factory settings/new iOS device.
    iOS: How to back up your data and set up as a new device
    - Make an appointment at the Genius Bar of an Apple store.
    Apple Retail Store - Genius Bar

  • I can't print two-sided with my macbook air. i've tried to look for the driver in the settings of printer and faxes but there is none, my printer is able to print for that kind of option. please help

    Canon MP280 Series

    When you select print you should see a menu option labeled Printer Settings (or Printer Options). This may be hidden in 2 different ways. First, the program may have minimized the print dialog box. Look for a button labeled Show Details. If you see it you'll need to click on the button to see all the printer options that are available. Having done this you'll see more options. Typically you'd look for the Printer Settings under a popup menu labeled Layout but sometimes something else is showing. For example, below you'll see that Safari hides it under Safari.

  • Looking for a new toy to help your editing workflow?  Try this!

    I recently ditched my simple 2-button + scroll wheel mouse for a mouse on steroids: the Logitech G700.  What a difference!  It has 11 customizable functions that can be automatically activated depending on the program you're in!  So you can have a completely unique set of functions for Premiere, Photoshop, AE, Windows, etc, and each set will automatically/instantly be activated whenever that specific program/interface is the active one!
    Here are my 2 layouts to give you some ideas:
    Premiere Pro Layout:
    Windows Layout:
    You can even assign multi-step macros to keys.  For example, I set one of the keys to: Deselect clips + Add Default Video Transition.  So now, a single keypress will always apply my default video transition to the CTI, even if any clips were selected, just the way it worked in CS6 and I wanted it to keep working in CC!
    If you're looking for a simple inexpensive way to improve your editing work, I highly recommend getting a programmable mouse like this one!  If anyone has any other hardware devices that help their workflow, please share so that we can all benefit from the knowledge.
    Cheers!

    I am in the market for a new PC for my wife, and she will be inheriting the keyboard and mouse I am using now so I can get new ones. She picked these out to begin with since we were sharing a computer for a while so she will be happy with them.
    That looks like a really great mouse. I may just have to take your advice on this one.
    Although the newer version looks even cooler: http://www.amazon.com/Logitech-G700s-Rechargeable-Gaming-Mouse/dp/B00BFOEY3Y/ref=dp_ob_tit le_ce
    My wife would HATE that mouse, but since she will finally have her own again, I can get any mouse I want.
    Very cool. Thanks.

  • About:home comes up on my browser - how do I get rid of this? I cannot find the place to look for Internet Options so I can change my homepage - where is this on the new firefox? Thank you

    I have a new computer - it has windows 7 and I have your latest mozilla firefox running. about:home is the opening URL and I know this is not good. But when I looked for the tab to find Internet Options(like I had on my last computer) I can't find it anywhere! I used to use that to change my homepage - that got rid of the about:home before. So now, what should I do? Where is the Internet Options tab? I did try to use the control panel to switch my homepage, but it only switched my Internet Explorer browser homepage, even though it is not my default browser. Thank you.

    http://support.mozilla.com/en-US/kb/How+to+set+the+home+page

  • Can someone help me? How do I change the option to pick where or what program I want to open a file after I've downloaded it? I tried to look for an option for this and can't find it anywhere.

    For example I download a file and I click on it and there will sometimes be a window that opens saying what program I want to open the file with? And then it'll also have a check box saying if I want to use this program for all files I download. I can't change it when I download the file because that one file I keep downloading keeps crashing my Firefox and I have to force quit. It's really getting on my nerves. It's an online statement I'm trying to view and I want to get rid of that problem!! Is there anyway to change that option without going to that download page?

    I would recommend going into device manager on your PC and making sure that you have correctly installed the IR dongle. Also what version of hotsync manager are you currently using?
    Post relates to: Treo 800w (Sprint)

Maybe you are looking for

  • ISE 1.2 Sponsor Portal issue

    Hi we have an ISE version 1.2 installation and are trying to customise the Sponsor Portal login page to show the Terms and conditions for staff whan accessing the page, by using the display pre-loign banner under the sponsor portal themes settings. W

  • Set up Webdocuments - DMS

    Hello, Can any one help me out in the customizing part of DMS(Document Management System) i.e.,<b>Set up webdocuments - in IMG guide(SPRO)</b> Regards, John

  • BILL OF EXCHANGE

    Dear all, What is the Bill of exchange process please explain me thanks in advance. Sriram.

  • Module Pool Programming - noninput screen

    Hi Folks, I have a requirement where i need to have check box.When check box is checked screen fields should be enabled else it should be disabled. Please suggest me. If the checkbox is checked fields should become mandatory. Please suggest

  • WebDynpro ABAP and Portal Navigation problem

    Hi all, I've a problem with triggering Portal navigation from a custom WD4A application. The request is to have an "Exit" button implemented and if pressed, the portal goes back to the top page: --> Search    --> Kind of Search       --> WD4A -> Exit