How can I read text files from LAN if I only know the hostname?

I'm new in Java Developing, and dont know the written classes yet. I need help, how to do the following steps?
<p>1. How can I read text files from LAN if I only know the hostname, or IP address?
<p>2. How to read lines from text files without read all lines from the beginning of file, just seek to a position.
(ex. how can I read the 120th line?)
<p>Please help!
<p>sorry for the bad english

I'm new in Java Developing, and dont know the written classes yet. I need help, how to do the following steps?
1. How can I read text files from LAN if I only know the hostname, or IP address?You need to know the URL of the file. You need to know the hostname, port, protocl and relative path.
The hostname is server, not file.
2. How to read lines from text files without read all lines from the beginning of file, just seek to a position.Use the seek() to get to a random byte.
(ex. how can I read the 120th line?)The only way to find the 120th line is to read the first 120 lines. You can use other file formats to find the 120th line without reading the whole file but to need to be able to detremine where the 120th line is

Similar Messages

  • How can I read pdf files from LabVIEW with different versions of Acrobat reader?

    How can I read pdf files from LabVIEW with different versions of Acrobat reader?
    I have made a LabVIEW program where I have possibility to read a PDF document.  When I made this LabVIEW program it was Acrobat Reader 5.0.5 that was installed on the PC. Lather when the Acrobat Reader was upgraded to version 6.0, there was an error when VI tries to launch the LabVIEW program. And Later again when we upgraded to Acrobat Reader 7.0.5 I must again do some changes and rebuild the EXE files again
    It isn't so very big job to do the changes in one single LabVIEW program, but we have built a lot of LabVIEW programs so this take time to due changes every time vi update Acrobat Reader. (We have build EXE files.)
    The job is to right click the ActiveX container and Click "Insert ActiveX Object", then I can brows the computer for the new version of acrobat Reader. After this I must rebuild all the "methods" in the Activex call to make the VI executable again.
    Is there a way to build LabVIEW program so I don't have to do this job every time we update Acrobat Reader?
    This LabVIEW program is written in LabVIEW 6.1, but I se the problem is the same in LabVIEW 8.2.
    Jan Inge Gustavsen
    Attachments:
    Show PDF-file - Adobe Reader 7-0-5 - LV61.vi ‏43 KB
    Read PDF file.jpg ‏201 KB
    Show PDF-file - Adobe Reader 5-0-5 - LV61.vi ‏42 KB

    hi there
    try the vi
    ..vi.lib\platform\browser.llb\Open Acrobat Document.vi
    it uses DDE or the command line to run an external application (e.g. Adobe Acrobat)
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • Can't read text file using UTL_FILE

    Hi All,
    how can I read notepad file using UTL_FILE package.I have specified the UTL_FILE_DIR in the init.ora file.My objective is to when a button is clicked, the contents of the file will display in a text item.Here is my code written in WHEN_BUTTON_PRESSED trigger.
    DECLARE
         file_handle UTL_FILE.FILE_TYPE;
    data_line Varchar2(100);
    BEGIN
         file_handle := UTL_FILE.FOPEN('E:\vimal','abc.txt','R');
              message('directory created');
         UTL_FILE.GET_LINE(file_handle, data_line);
         :block2.t1 := data_line;
         UTL_FILE.FCLOSE(file_handle);
    END;

    Why don't you use text_io? Don't forget that UTL_FILE is reading directories from the database point of view. The E drive for the database is a different E then on your client pc. I presume your database is on a different computer. Are you getting any errors?

  • How can I import HDV-Files from a CF-Card to Final cut Pro 5.1.4

    How can I import HDV-Files from a CF-Card (recorded with the Sony HVR Z 7E) to Final cut Pro Version 5.1.4 – is this possible at all?
    I managed to import the files to Premiere, but it was just a test. I am working at a very huge documentary project with Final cut Pro Version 5.1.4 thats why I would prefere not to change the program or the version.
    Simply exporting from Premiere back to final cut is also very complicated.
    Thanks for any ideas.

    First, copy the card to a hard drive connected to your fcp workstation.  I always back up all card based media at least 2 or three times.  All hard drive will eventually fail.  It's a question of when, not if.
    I'm not familiar with this particular camera, but examine the contents of the copied files and see if you can find any .mov files.  You can try importing these directly into fcp.
    If you don't, you can try something like clipwrap
    http://www.divergentmedia.com/clipwrap
    or
    Magic Bullet Grinder
    http://www.redgiantsoftware.com/
    But, I'd really advise upgrading to at least fcp6 or ideally fcp7 if you can find a copy.  HDV is a problematic format.  Although you can certainly work with it and it's a fcp approved format, converting your media to prores would make your life much easier.

  • How can I delete a file from Adobe Acrobat Reader DC?

    How can I delete a file from Adobe Acrobat Reader DC?

    What operating system do you use? Where do you store the files?

  • How can we read some bytes from every line of the file

    How can we read some bytes from the every line of the file moving on to the next line
    without using the read line

    Actualiy readLine() takes more execution time
    for reading a part of line if we can do so without
    readLine() we can save some time...Well, if you knew, beforehand, the length of each line, you could use RandomAccessFile and its seek method, but, since you don't, you would have to read the rest of the line character-by-character, checking to see if it is a newline, in order to place the "cursor" at the beginning of the next line in order to read the next few characters you want.
    So, as you can see, you will need to read the entire line anyway (and if you do it yourself you also have to do the checking yourself considering all three possible end-of-line sequences), so you just as well use readLine().
    Some people may suggest Scanner and it's nextLine() method, but that also needs to read the rest of line (as evidenced by the fact that it returns it), so that is no different than the readLine() (or read it yourself) solution.

  • HI,,,How to read text file from my emulators root

    hi friends,
    Actully i m having problem with file connection i.e. i cant read text file from my root of the emulator.....
    i have tried like this...
    plz help me out
    String uri = "file:///C:/WTK22/appdb/DefaultColorPhone/filesystem/root1/New Folder/main.txt";
    InputConnection conn = (InputConnection)Connector.open( uri,Connector.READ );
    InputStream in = conn.openInputStream();
    conn.close();
         for(int j=0;j<12;j++)
         ch=in.read();
         str.append((char)ch);
    par1=str.toString();
    in.close();
         screen4.append(par1);
         display.setCurrent(screen4);

    still its not working.........
    String uri = "file:///C:/WTK22/appdb/DefaultColorPhone/filesystem/root1/readme.txt";
                        FileConnection conn = (FileConnection)Connector.open( uri,Connector.READ);
                        InputStream in = conn.openInputStream();
                        conn.close();
                   String ss="";
                   String str1="";     
                   int ch=0;
                   byte b[]=new byte[753];     
                             ch=in.read(b,0,753);
                             str1= new String(b,0,ch);
                                  ss=str1.substring(493,501);                     
                        screen4.append(ss);
                        display.setCurrent(screen4);
                        }catch(IOException io){}

  • How can I copy mp3 files from my Itunes library to an SD card for use in a non-apple phone?

    How can I copy mp3 files from my Itunes library to an SD card for use in a non-apple phone?  I can physically copy the tunes as mp3's but the phone does not seem to be able to play all of them.   Do I need to copy an entire album or can I just pick & choose individual songs?   The phone is question is an LG running who knows what for an operating system.

    AAC is Advanced Audio Coding.  Basically it's a format that sounds better than MP3 but doesn't take up as much space as a lossless format (like you'd have on a CD).  More than likely you've had that encoding turned on when you ripped your music into itunes (it's the default encoder).  Therefore your LG phone won't play them.
    You need to turn off the AAC format by going to the iTunes menu, Preferences, General (at the top), then clicking the "Import Preferences" button.  Change the AAC Encoder to MP3 Encoder.  After that you'll have to make MP3 copies of your songs by right clicking them and selecting "Create MP3 Version."  You'll get a copy of the song that should transfer to your SD card and have MP3 encoding.  Hopefully your phone will play that.

  • How can I bring a file from a folder on my desktop to this program and make it editable. Like deleti

    How can I bring a file from a folder on my desk top int this program and make it editable., in order to replace words or remove words or texts..?  jn

    Hi,
    FormsCentral cannot be used to edit existing PDF documents. That functionality is available in Adobe Acrobat:
    http://www.adobe.com/products/acrobat.html
    Regards,
    Brian

  • How can i print my files from mi iphone 5 throught the airport express?

    How can i print my files from mi iphone 5 throught the airport express?? i have the last iOS version installed and also the last firmware version of the printer. the printer is already connected to the USB airport express and when i look for printers in airprinter there is no printer found. i have an HP LASERJET P1606dn(i think that is supported by the airprinter).

    In order to function with AirPrint, a printer must connect to the network wirelessly.
    Even if you have an AirPrint compatible printer, iOS devices will not be able to print to the printer when it is connected via USB.
    So, you have two options:
    1) Reconfigure the printer to connect to the network using wireless only and the iOS devices should be able to print that way....assuming that you have up to date drivers for the printer installed.
    2) Leave the printer connected via USB and then use a third party App like Printopia installed on your Mac as a "workaround" to (hopefully) allow the iOS to device to be able to print.  If you want to give this a try, there is a free trial for Printopia, so you will know if it will work before you buy. You must have a Mac running on the network in order for Printopia to function correctly.
    Printopia - AirPrint to Any Printer - Print from iPad - Print from iPhone ...

  • How can i print text messages from my htc amaze to my deskjet 3050A

    how can i print text messages from my htc amaze to my hp deskjet 3050A

    Hi,
    I believe the phone uses Android OS, v2.3.4 (Gingerbread) therefore you can use one of these applications:
       http://www.printeron.com/apps/androidprinting.html
       https://market.android.com/details?id=com.pauloslf​.cloudprint&hl=en
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How can I restore iCloud files from my lost iPhone

    I backed up my files to icloud. But I lost my Iphone last week. How can I restore my files from icloud to my macbook ?

    Are you using Photostream?  If yes, then you will be able to see your 1000 most recent photos on your Mac in iPhoto.
    All your contacts, calendar events, emails, etc. will still be on your Mac as part of iCloud.
    If you didn't import your videos from your iPhone to your Mac, then you've lost them unless you can restore your cloud backup to another iOS device.

  • How can I upload raw files from my canon g7x to lightroom5

    How can I upload raw files from my canon g7x to lightroom

    See this thread in the official Adobe feedback forum: Why doesn't my version of Photoshop or Lightroom support my camera?

  • HOW CAN I TRANSFER VIDEO FILES FROM MY PC TO IPAD MINI VIA ITUNES??? WITHOUT ANY ADDITIONAL DOWNLOADABLE APP

    HOW CAN I TRANSFER VIDEO FILES FROM MY PC TO IPAD MINI USING ITUNES???  i have to google every little thing that has to do with my ipad, why cnt they make it more user friendly???? i have to dl another app just so ican transfer vid files to mu ipad mini. i already converted them to the proper format. i just cant seem to find out how to transfer with with only itunes

    im just new to itunes and ipad mini is my first apple product thats why im really having a hard time with this. i cant transfer the video file to my library... i tried dragging it to the "movies" part in my library but it still doesnt copy to the movie librarry just like how i do it with my songs.. not even the typical list appears.... all it says is movies and studd about the library and itunes, ill post a pic so u can see...

  • How can I delete PDF files from my iMac desktop?

    How can I delete PDF files from my iMac desktop?

    Not on my system,When I try to dump if off in the trash it will not go. I get a message that says this file cannot be removed. I also tried going to File and clicking on Move to Trash. No dice.

Maybe you are looking for

  • Still frames in project turn blurry after exporting to QuickTime

    My sequence (standard definition) looks flawless when I play it back in FCP7 -- but after exporting it to QuickTime (export to QuickTime, self-contained movie, recompress all frames) a few of the still photos throughout the project are now quite blur

  • Too many values.Not displaying all the data

    Hi All,         I have facing the problem, while showing the map for different location. It says that Too many "ColumnName" Values. I cant find any where what is the limitation while representing the maps....... Please share any one have aware of it.

  • MAC Itunes Mp3 CD Problem

    Please Help I need to burn an Mp3 cd on my mac. I need some of the songs to play 3 or 4 times, so I cannot use toast unless i change each song names 3 times So I tried using Itunes Playlist. But none of the 2 equipments I use can read the Cd's burned

  • Setting the Tools Service ssl port

    Following this document (link below), and in the section in which they talk about changing the tools service ssl port. It says you want to change it in two places, but only describes how to do that in one of them. The change to server.xml is explaine

  • Jaggy text display in Safari?

    Hello, I`ve got a problem with unsharp text in the Safari Browser. This is a simple Adobe Edge HTML5 navigation with a hover animation. But the Text, in this case a pictures of Text not rezised or anything, is displayed unsharp & jaggy in the Safari