Read from File which is dynamically updated

Hello all
Is there any class for reading from a file which is dynamically updated?and those updates are immediatley reflects in java File object without closing previous and reopen that file again to get the latest updates?
thanks
sjafery

I meant RandomAccessFile

Similar Messages

  • Web Service; Error attempting to read from file

    I'm trying to connect to a web service as outlined by the book "Creating Dynamic Forms with Adobe LiveCycle Designer" which is an excellent book by the way.
    I'm receiving the following error "Error attempting to read from file. http://www.webservicex.net/BibleWebservice.asmx"
    I've successfully created the Data Connection to
    http://www.webservicex.net/BibleWebservice.asmx?wsdl
    I dragged and dropped the bookTitle, chapter & Versie onto the form. I also dragged and dropped the GetBibleWordsByChapterAndVerseResult and the GetBibleWordsByChapterAndVerseBtn.
    I Preview PDF and click the button I get the above error.
    Does anyone have experience using Web Services with Adobe LiveCycle ES and have advice on how to resolve this. Any Suggestions would be greatly appreciated.
    -Todd

    Well, I have more news on the error I'm getting. - NO I didn't find the problem. Yet
    I checked and made sure that web.config had "None" selected " in authentication mode. I.E. <authentication mode="None" /> This should eliminate any authentication problems since that turns off IIS's authentication checking.
    At first I was thinking the form was generating the error trying to read the result coming back from the web service, but I put in some code that writes the result to a log file when the method fires off.
    I noticed that when I clicked on the button on the form, the error message would pop up from Acrobat, but when I check the log file, there was NO entry. This means that Acrobat failed before it could execute the method.
    Here is the web method:
    [WebMethod(CacheDuration = 30,
    Description="Returns the String 'True' or 'False' whether or
    not you entered a 'T' or 't'.")]
    public string TF(string Tf)
    string result="False";
    if(Tf.Substring(0,1).ToLower()=="t"){
    result= "True";}
    LogFile.Write("Sent: "+result);
    return result;

  • BDC read from file!

    Dear friends,
           I have one problem. When we are creating abap program by clicking on program button on recording screen it asks for the program name and there are 2 oprions..
    1) read from file and
    2)transfer from recording....second one is fine...but i am not able to use first option...how to use that and why it is used...
    Thanks And Regards,
    Bhavin Shah.

    Hi Bhavin,
          The basic difference between read from file & transfer from recording is that...
        In transfer from recording you have to give a session name or you have to choose call transaction. Here you have to give the data manually.
        The Read from file will generate a dataset where who have to give that path of your flat file. When you execute it the data from the flat file will go into the necessary fields you have choosen before. You can process the job in the back ground which will be executed and a log file will be generated so that you can check whether it is updated correctly or not.
          In general we use read from file option when we know that the data are correctly arranged for recording.
          For eg. if you want to update the database with the file you have to know the datatype and length of each database-field so that you can specify the data in a file.
          i.e Assume that you are having 2 fields in db-table of type char and length 10 & 20. Assume that you are going to give values for these fields as mala & kala.
    In the file... you should specify like this...
    mala      kala                xxx
    123456789012345678901234567890
    <---Ten--><-----Twenty------->
    In a Real Time scenario you have a very large table with 50 to 100 fields to update with a very large data like 1000 - 10,000 records and if you are not sure with the flat file data. Then you should not go for the file option.
    Hope this helps you.
    Regards,
    Maheswaran.B

  • [Error] Microsoft SQL Server 2008 Setup. Error reading from file msdbdata.mdf

    Hi all
    I'm trying to install SQL 2008 Express on my Computer: Hp compact DX7300 Slim tower.
    and get this error:
    TITLE: Microsoft SQL Server 2008 Setup
    The following error has occurred:Error reading from file d:\8268cd7b247d294de359c9\x86\setup\sql_engine_core_inst_msi\PFiles\SqlServr\MSSQL.X\MSSQL\Binn\Template\msdbdata.mdf.  Verify that the file exists and that you can access it.
    Click 'Retry' to retry the failed action, or click 'Cancel' to cancel this action and continue setup.
    For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.0.1823.0&EvtType=0xF45F6601%25401201%25401
    Log file
    Overall summary:
      Final result:                  SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.
      Exit code (Decimal):           -2068643839
      Exit facility code:            1203
      Exit error code:               1
      Exit message:                  SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.
      Start time:                    2014-12-09 23:22:03
      End time:                      2014-12-09 23:40:28
      Requested action:              Install
      Log with failure:              C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\sql_engine_core_inst_Cpu32_1.log
      Exception help link:           http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.0.1823.0
    Machine Properties:
      Machine name:                  VISTA-PC
      Machine processor count:       2
      OS version:                    Windows Vista
      OS service pack:               Service Pack 1
      OS region:                     United States
      OS language:                   English (United States)
      OS architecture:               x86
      Process architecture:          32 Bit
      OS clustered:                  No
    Product features discovered:
      Product              Instance             Instance ID                    Feature                
                     Language             Edition              Version         Clustered 
    Package properties:
      Description:                   SQL Server Database Services 2008
      SQLProductFamilyCode:          {628F8F38-600E-493D-9946-F4178F20A8A9}
      ProductName:                   SQL2008
      Type:                          RTM
      Version:                       10
      SPLevel:                       0
      Installation location:         d:\8268cd7b247d294de359c9\x86\setup\
      Installation edition:          EXPRESS
    User Input Settings:
      ACTION:                        Install
      ADDCURRENTUSERASSQLADMIN:      False
      AGTSVCACCOUNT:                 NT AUTHORITY\NETWORK SERVICE
      AGTSVCPASSWORD:                *****
      AGTSVCSTARTUPTYPE:             Disabled
      ASBACKUPDIR:                   Backup
      ASCOLLATION:                   Latin1_General_CI_AS
      ASCONFIGDIR:                   Config
      ASDATADIR:                     Data
      ASDOMAINGROUP:                 <empty>
      ASLOGDIR:                      Log
      ASPROVIDERMSOLAP:              1
      ASSVCACCOUNT:                  <empty>
      ASSVCPASSWORD:                 *****
      ASSVCSTARTUPTYPE:              Automatic
      ASSYSADMINACCOUNTS:            <empty>
      ASTEMPDIR:                     Temp
      BROWSERSVCSTARTUPTYPE:         Disabled
      CONFIGURATIONFILE:             C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\ConfigurationFile.ini
      ENABLERANU:                    True
      ERRORREPORTING:                False
      FEATURES:                      SQLENGINE,REPLICATION
      FILESTREAMLEVEL:               0
      FILESTREAMSHARENAME:           <empty>
      FTSVCACCOUNT:                  <empty>
      FTSVCPASSWORD:                 *****
      HELP:                          False
      INDICATEPROGRESS:              False
      INSTALLSHAREDDIR:              C:\Program Files\Microsoft SQL Server\
      INSTALLSHAREDWOWDIR:           C:\Program Files\Microsoft SQL Server\
      INSTALLSQLDATADIR:             <empty>
      INSTANCEDIR:                   C:\Program Files\Microsoft SQL Server\
      INSTANCEID:                    SQLExpress
      INSTANCENAME:                  SQLEXPRESS
      ISSVCACCOUNT:                  NT AUTHORITY\NetworkService
      ISSVCPASSWORD:                 *****
      ISSVCSTARTUPTYPE:              Automatic
      MEDIASOURCE:                   d:\8268cd7b247d294de359c9\
      NPENABLED:                     0
      PID:                           *****
      QUIET:                         False
      QUIETSIMPLE:                   False
      RSINSTALLMODE:                 FilesOnlyMode
      RSSVCACCOUNT:                  <empty>
      RSSVCPASSWORD:                 *****
      RSSVCSTARTUPTYPE:              Automatic
      SAPWD:                         *****
      SECURITYMODE:                  <empty>
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  SQL_Latin1_General_CP1_CI_AS
      SQLSVCACCOUNT:                 NT AUTHORITY\NETWORK SERVICE
      SQLSVCPASSWORD:                *****
      SQLSVCSTARTUPTYPE:             Automatic
      SQLSYSADMINACCOUNTS:           VISTA-PC\VISTA
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  False
      TCPENABLED:                    0
      X86:                           False
      Configuration file:            C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\ConfigurationFile.ini
    Detailed results:
      Feature:                       Database Engine Services
      Status:                        Failed: see logs for details
      MSI status:                    Passed
      Configuration status:          Passed
      Feature:                       SQL Server Replication
      Status:                        Failed: see logs for details
      MSI status:                    Passed
      Configuration status:          Passed
    Rules with failures:
    Global rules:
    Scenario specific rules:
    Rules report file:               C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141209_232121\SystemConfigurationCheck_Report.htm
    I will very appriciate if someone can help me solve it. I was trying to set Full control for my account in Properties/Security of root folder and try again but error is still.
    Many thanks

    Hi Foreverduy,
    Before you run SQL Server 2008 express setup, make sure that you have installed Windows installer 4.5 and.NET Framework 3.5 SP1 manually. For more information about the process, please refer to the article:
    http://msdn.microsoft.com/en-us/library/ms143506(v=sql.100).aspx. Moreover, please turn off all the third-party softwares which could prohibit the installation process.
    According to your error message, the issue could be due to that your account has no rights to install SQL Server, or the corruption on the media.
    Firstly, please ensure that your account has admin rights. Also make sure that you right-click the setup.exe and choose “Run as administrator” to complete the installation.
    Secondly, please check if "msdbdata.mdf" file exists at d:\8268cd7b247d294de359c9\x86\setup\sql_engine_core_inst_msi\PFiles\SqlServr\MSSQL.X\MSSQL\Binn\Template. If it exists, please make sure that your account has read permission to the extracted
    folder.
    However, if the file doesn't exist in the extraction, the media could be corrupt. Please download the
    media
    again and check if the issue still occurs.
    Regards,
    Michelle Li

  • I want to read a file which is in a zip and this zip file is at ftp site

    i am facing this problem and try to find the solution from last month please help me
    i want to read a file which in ziped and this zip file is at ftp site. and i want to read this file without downloading this zip file to local machine. i have to read it from ftp location only

    You can open an URLConnection to a file on an FTP server (search this forum to find out how). You can get the InputStream from the URLConnection and feed it to ZipInputStream. That should do the job.

  • How to synchronize if one servlet read a file and anothe servlet update the

    How to synchronize if one servlet read a file and anothe servlet update the file at a time?

    Create a class that holds the reference to the file and do the whole file manipulation just in that class. than synchronize the read and write methodes. A reference to this file handler class can be stored to the servlet context in one servlet and read out from the servlet context in the other servlet.

  • Error reading from file glibc-2.5-24.i686.rpm RHEL 5 Setup stuck at 80%

    Hi, I am installing Oracle 10g on RHEL 5 (Red Hat Enterprise Linux 5) machine I am facing two problems
    1) while installing the rpm packages the following package gave an error
    Error reading from file glibc-2.5-24.i686.rpm
    2) I still gave a try to runInstaller command the installer opened but was stuck at 80%
    I have 3 GB ram and 320GB hard drive I am not sure what to put in the swap memory and other settings i blindly followed instructions given here
    http://www.oracle-base.com/articles/10g/OracleDB10gR2InstallationOnRHEL5.php
    What could be the problem where do I find the error log if its created
    Please help me
    Thanks
    Edited by: 891355 on Nov 6, 2011 12:06 PM

    I found the installActions file in the installer folder and I think this could be the problem
    INFO: The 'shiphomeproperties.xml' file is missing from shiphome location '/home/oracle/Desktop/database/install/../stage/products.xml.' Add this file to the 'Disk1/stage' directory of the shiphome.
    though I am attaching the log file for more details do you think the installer is corrupt :(
    InstallActions log file ==> http://www.mediafire.com/?nh7mx7bxqht9ovu
    Edited by: 891355 on Nov 6, 2011 1:35 PM

  • Adobe Illustrator CS4 Error: Error 1603. Error 1305.Error reading from file C:\Program Files\Adobe\Adobe Illustrator CS4\Support Files\Required\Fonts\AdobeSongStd-Light.otf.  Verify that the file exists and that you can access it.  AdobeColorCommonSetRGB

    Iam trying to load illustator in my PC i get following error while loading Application CD 2
    Adobe Illustrator CS4
    Error:
    Error 1603. Error 1305.Error reading from file C:\Program Files\Adobe\Adobe Illustrator CS4\Support Files\Required\Fonts\AdobeSongStd-Light.otf. Verify that the file exists and that you can access it.
    AdobeColorCommonSetRGB
    Error:
    Error 2.
    My serial no. [Removed by moderator]

    Download a copy an installer for CS4 from the links on this page:
    Other downloads

  • Read from file and plot data against timestamp

    Hello,
    I know that there are already many posts regarding the question I m about to ask. But, I somehow dont seem to achieve what I want using the suggestions given in the other posts.
    My problem is that, I have a file with the first column as a time stamp containing hour, minute, second and millisecond. The second column in a set of pressure values. I want to plot a graph of these pressure values against the timestamp recorded in this .txt file. Whatever I do, the timestamp values seem to skip by a couple of seconds.
    How do i do this correctly?
    Also, Is it advisable to use the read from file or the read from spreadsheet file vi? Kindly help me out.
    Thanks and regards.

    Hey, I was having a similar issue the other day.  The first problem I had was how to open the file and actually get the timestamp information.  Since I'm using LabView 8.0, I had to go into Read Spreadsheet File and create a new vi to open strings (in an array form).  That's the Read Spreadsheet File (string) vi below.  Then, I had to figure out how to convert the string of a timestamp to something meaningful to me.  The Timestamp2.vi is how I did that below.  I'm also including a little test file.  So, to run Timestamp2.vi, you will have to input the right base path, and have the Read Spreadsheet File (string).vi in the same place as Timestamp2.  Hope that helps.  I think I'm finally getting this stuff, so let me know if it doesn't work.
    Attachments:
    Test.txt ‏1 KB
    Timestamp2.vi ‏28 KB
    Read From Spreadsheet File (String).vi ‏25 KB

  • Is there is abetter performance to read from file than my code for longfile

    Hi
    This is my code to read from file and show it in a text area ,but for long file it wait for along time to show the file ,Is there is better performance code?
    chooser=new JFileChooser();
                        chooser.showOpenDialog(sav);
                        File fe=new File(chooser.getSelectedFile().getAbsolutePath());
                        //out = new PrintWriter(new FileOutputStream(f));
                         in2 = new BufferedReader(new FileReader(fe));
                         str=in2.readLine();
                         if(str!=null)
                             nn2=str;
                         str=in2.readLine();
                        try{
                         while((str)!=null)
                         { nn2=nn2+"\n"+str;
                             str=in2.readLine();
                         }}catch(NullPointerException e){}
                         jta2.setText(nn2);
                          in2.close();
                       // in2 = new BufferedReader(new FileReader(fe));
                    } catch (IOException ex) {
              }catch(NullPointerException e){}
                  nn1=str;

    Yes you code would be slow because you are continually creating new string by concatenating one string to another.
    The easiest way is to simply use the read(...) method of the text area.

  • Read from file at a particular rate

    hi
    could anyone tell me if its possible to read from a previously stored text file at some required  rate?
    ( for example if i have 100 entries in my file i wish to read one value every 5 seconds)
    thanks in advance
    Solved!
    Go to Solution.

    First, you'll have to learn not to use Express VI's.  (Look in example finder for examples on file I/O)
    1.  You have no good control over the way it accesses the data.
    2.  It puts out the annoying dynamic datatype which hides what the data is, and makes you jump through hoops to get the real data out of it.
    Second, you need a loop.  Right now your code is set up to just run as a single shot.
    Here is how you would read one line at a time with a 2 second delay.  (Note that the read text file was set in its right click menu to "read lines".)
    Another alternative, (and probably better), would be to read the whole file at once, and then just index the values out of the resulting array in a loop with a 2 second delay.
    The formula express VI's are doing some operations that could be handled easily with native LabVIEW code.  I would get rid of those express VI's.  The first formula node has some pretty basic operatons as well.  The bigger formula node could also be done with basic LabVIEW operations, but the coding logic going on in there is complicated enough that I would probably leave that formula node as it is.
    Message Edited by Ravens Fan on 03-04-2010 01:05 AM
    Attachments:
    wind%20solar[1]_BD.png ‏14 KB

  • Reading from file one at a time

    I am trying to read from an Excel file one cell at a time, and am having some trouble. I have included my VI. Any help would be greatly appreciated.
    Attachments:
    demo.vi ‏165 KB

    Your first problem is that you are using the Read file function. This doesn't work with Excel. Native Excel files have their own special format and you have to use ActiveX to read them. If you have the report generation toolkit, you can use that or look at the examples on the Excel Board. You can also save the Excel file as comma or tab separated text and then the Read From Spreadsheet or Read File will work.
    Second, if the file is static, you would be much better off to read the file all at once to an array and then just index out the values inside the while loop. It looks like you are getting temperature values from a file. Is the Excel file being generated at the same time as your program? If it is, what is generating the file? Maybe that program can be controlled by LabVIEW and you can get the temp values directly from it. If it's a file that is constantly being updated, then the reading is going to be somewhat comlpicated if you care at all about getting the most recent value.

  • How to read a file which has header and without header

    Hi,
    I have a file to file scenario wherein there are txt files in the source system, some of which has header and some without header.
    How does the sender adapter dynamically identify a file with header and without header.
    I knew that File content Conversion in the sender adapter with "Recordsets per message = 1" can read the header.  But how to handle dynamically.
    Thanks in advance for suggestions and advice.
    Regards.
    Praveen

    Hi,
    Let me give a more clear picture:-
    One of my file which has header and the corresponding values is listed hereunder:
    PERNR;KID;PNALT;NACHN;NAME2;VORNA;TITEL;TITL2 and so on.....
    ;1200;1200;Angus;; and so on.........
    Other file which has no header but only values in it:-
    1200;1200;;Werner;Angus and so on.......
    The structure remains same for all the files.  The only difference is that some of the file has header in it and some without header.  The Message Type is mentioned hereunder:-
    DT_LegacyEmployee (Category - Complex Type)
         Employees (Category - Element, Occurence - 1)
              Employee (Categroy - Element, Type - DT_LegacyEmployee_Row, Occurence - 0...unbounded)
                   PERNR
                   KID
                   PNALT
                   NACHN
                   NAME2 and so on......     
    I read the file in record row.  The file conversion parameters in the file sender adapter are mentioned hereunder:-
    Document Name - MT_LegacyEmployee
    Document Namespace - http://abc.com/xi
    Recordset Name - Employees
    Rescordset Structure - Employee,*
    Recordsets per Message - 1
    Key Field Type - String (Case Sensitive)
    Employee.fieldSeparator - ;
    Employee.endSeparator - 'nl'
    Employee.fieldNames - PERNR,KID,PNALT,NACHN,NAME2,VORNA,TITEL,TITL2 and so on........
    How do we dynamically identify whether the file has header or not.  Even if the file has header or without header, the file needs to be picked and transferred to the target system.  Kindly clarify.
    Regards.
    Praveen

  • HT1338 i have tried to update the iPhoto in an iMac from 2010 which i have updated from Snow Leopard to to Mountain Lion but its impossible.What can i do?

    i have tried to update the iPhoto in an iMac from 2010 ( in which i have updated the OS from SnowLeopard to Mountain Lion 10.8.3) but it doesnt work,why? Is my iPhoto too old to update  do i have to buy and install  a new version of i Photo ? 

    You may need to buy the newest version from the App Store. If you cannot update via the App Store then you are using the version from a DVD. Updates for that can be downloaded from support.apple.com/downloads/.

  • Java Applet that reads from file

    I'm quite new to java, I'm fiddling around with it for a nonprofit organization.
    I have a java program that reads from a specified file and generates output but my final goal is a search box on the website that will take user input, run it through my program which searches through a prespecified file, and generate output.
    I'd appreciate any help.

    What can I do with this? I need it to be a String because I'm breaking it down to Tokens.
    Thanks,
    -Grant
    Scanner input = null; //input is going to be the Scanner object
    input = new Scanner(new BufferedReader(new FileReader("test.txt"))); /*setting up the Scanner object "input" to read the file "test.txt"*/
    String words = null;
    String MyArray[] = new String[5000];
    while (input.hasNext()) { //Puts ALL the file's data into one string
    words = words + " " + input.next(); /*Without that space the string "words" contains is all just one word making it unTokenizable*/
    }

Maybe you are looking for

  • Loading 361000 records at a time from csv file

    Hi, One of my collegue loaded 361000 records from one file file , how is this possible as excel accepts 65536 records in one file and even in the infopackage the following are selected what does this mean Data Separator   ; Escape Sign      " Separat

  • HT4623 After I updated the software to iOS 7.1.1 why I am still having the problem of charging the phone twice w/in a day?

    I just bought my iPhone 4s last April 29, 2014 and have the iOS 7 preset software but then I fully charge the phone and after couple of ours the battery is empty, at first I was shocked since this is a new phone and apple products are known for havin

  • Wall charger and travelling to Europe

    I've got a 5G video ipod. I'm about to go to europe and need a wall charger to charge my ipod as i won't have a laptop with me to charge it via usb port. With my old 2G ipod, the apple wall charger converted the 220V in Europe nicely . Should I purch

  • Custom view in onet.xml?

    I'd like to create a custom view in my custom site definition, but I'd like to avoid unnecessary complexity. An extra feature that completely redefines an oob list in order to change a single default value to be used only once strikes me as, to not u

  • Viewing videos sent to email

    a friend sent a video(taken with her cell phone) from her cell phone to my email address...when i check my email on my iphone, i have a little problem... from what i can tell the video uses Quicktime...i do get the video but its much darker than the