Issue with Reading and Writing to a File

Hello all,
I'm having trouble when I run the following example;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.BufferedReader;
import java.io.PrintWriter;
import java.io.IOException;
public class ReadWriteTextFile {
    private static void doReadWriteTextFile() {
        try {
            // input/output file names
            String inputFileName  = "README_InputFile.txt";
            String outputFileName = "ReadWriteTextFile.out";
            // Create FileReader Object
            FileReader inputFileReader   = new FileReader(inputFileName);
            FileWriter outputFileReader  = new FileWriter(outputFileName);
            // Create Buffered/PrintWriter Objects
            BufferedReader inputStream   = new BufferedReader(inputFileReader);
            PrintWriter    outputStream  = new PrintWriter(outputFileReader);
            outputStream.println("+---------- Testing output to a file ----------+");
            outputStream.println();
            String inLine = null;
            while ((inLine = inputStream.readLine()) != null) {
                outputStream.println(inLine);
            outputStream.println();
            outputStream.println("+---------- Testing output to a file ----------+");
            outputStream.close();
            inputStream.close();
        } catch (IOException e) {
            System.out.println("IOException:");
            e.printStackTrace();
    public static void main(String[] args) {
        doReadWriteTextFile();
}Im getting the error
java.io.FileNotFoundException: README_InputFile.txt (The system cannot find the file specified)However the file README_InputFile.txt is definately in the same folder as the class file. So why is this not working?
Any help would be greatly appreciated.
Jaz

Sorry you've lost me. All I get are error messages
when I try to compile that statement. What am I
missing?I don't know, it should work:
import java.io.*;
public class Test {
public static void main(String[] args) throws
IOException {
System.out.println(new
File(".").getCanonicalPath());
Sorry I forgot to add the "throws IOException" bit. It works and told me that the path is;
C:\Documents and Settings\Jaz\workspace\Tutorial
I've amended the code so it now looks like this;
String inputFileName  = "C:/Documents and Settings/Jaz/workspace/TutorialREADME_InputFile.out";
            String outputFileName = "C:/Documents and Settings/Jaz/workspace/TutorialReadWriteTextFile.out";but I still get the error below even though the files are present in that directory;
IOException:
java.io.FileNotFoundException: C:\Documents and Settings\Jaz\workspace\TutorialREADME_InputFile.out (The system cannot find the file specified)

Similar Messages

  • Reading and Writing large Excel file using JExcel API

    hi,
    I am using JExcelAPI for reading and writing excel file. My problem is when I read file with 10000 records and 95 columns (file size about 14MB), I got out of memory error and application is crashed. Can anyone tell me is there any way that I can read large file using JExcelAPI throug streams or in any other way. Jakarta POI is also showing this behaviour.
    Thanks and advance

    Sorry when out of memory error is occurred no stack trace is printed as application is crashed. But I will quote some lines taken from JProfiler where this problem is occurred:
              reader = new FileInputStream(new File(filePath));
              workbook = Workbook.getWorkbook(reader);
              *sheeet = workbook.getSheet(0);* // here out of memory error is occured
               JProfiler tree:
    jxl.Workbook.getWorkBook
          jxl.read.biff.File 
                 jxl.read.biff.CompoundFile.getStream
                       jxl.read.biff.CompoundFile.getBigBlockStream Thanks

  • Reading and writing from a file

    I am trying to read and write to a file so that I may store an array of string and a double in my application, but I have come upon a couple of problems; first when I put my file path into the path constant it will say that the file is not there ever though it is (so I have to force the issue and when the application asks for a file I have to browse and add the files), secondly when I run the program and it reads from the file it does not display the strings or doubles immediately instead I have to hit the submit button and than they finally come up, thirdly when I reset my values in the .txt files and put in my string and double and hit submit the array jumps one spot and starts at the index of 1 (array[1])  if anyone can help I would appreciate it a lot.
    here is my code:
    Harold Timmis
    [email protected]
    Orlando,Fl
    *Kudos always welcome
    Solved!
    Go to Solution.
    Attachments:
    testingfileIO.vi ‏30 KB
    double.txt ‏1 KB
    string.txt ‏1 KB

    Harold Timmis wrote:
    I am trying to read and write to a file so that I may store an array of string and a double in my application, but I have come upon a couple of problems; first when I put my file path into the path constant it will say that the file is not there ever though it is (so I have to force the issue and when the application asks for a file I have to browse and add the files),
    I don't see that behavior at all about forcing the issue.  Why are you using Not a Path constants?  Why not turn those constants into controls you put on your front panel?
    secondly when I run the program and it reads from the file it does not display the strings or doubles immediately instead I have to hit the submit button and than they finally come up,
    Put your array indicators before your event structure rather than after.  Think dataflow.  The code pauses at the event structure waiting for an even to fire.  Only when it does (such as hitting the submit button) does the data get written to the array indicators. 
    thirdly when I reset my values in the .txt files and put in my string and double and hit submit the array jumps one spot and starts at the index of 1 (array[1])  if anyone can help I would appreciate it a lot.
    I don't see this behavior either.  How come your double.txt file has names in it, and your string.txt file has doubles in it?

  • Very slow painting while reading and writing doubles into file

    for 15MB length file i = 7662080
    for 50MB length file i = 12414368
    Part of Code for writing into file follows like this:
    try{
    fos = new FileOutputStream("Angel.txt");
    File f = new File("Angel.txt");
         if(f.length() >=4)
         f.delete();
    fos = new FileOutputStream("Angel.txt");     
    dos = new DataOutputStream(new BufferedOutputStream(fos,1000000));
    int x=0;
    double y_last, y_new;
    for(int j=0 ;j<i ;j++)
    if(some condition)
    y_new = ....;
    try{
    //previously in vectors
    y_last = y_new;
    vect.add(new Line2D.Double(x, y_last, x, y_new)_;
    dos.writeDouble(y_new);
         }catch(Exception e){System.out.println(e);}
    dos.close();
    fos.close();
    x++;
    }catch(Exception excp){System.out.println(excp);}
    part of code for reading from file follows like this:
    public void paint(Graphics g)
    try{
         double y1, y2 =0;               
         Line2D.Double doub;
         raf = new RandomAccessFile("Angel.txt","r");
         dis = new DataInputStream(new BufferedInputStream(new FileInputStream(raf.getFD(),1000000)));
         raf.seek((rect.x*8));
         for (int i = 0/any value; (i < value as per choice); i++)
              g2.setStroke(new BasicStroke(0)); //2
              y1 = y2;
         y2 =dis.readDouble();
              doub=new Line2D.Double(i,y1,i,y2);
              g2.draw(doub);
    dis.close();
         raf.close();
    }catch(Exception excp){System.out.println(excp);}
    I tried using Object Streams but NotSerializable Exception is thrown as Line2D.Double objects
    are not serialized.
    Any idea to make reading and writing into file specially from MB files faster is appreciated.

    Why are you reading in the file in the paint method ?
    Create your data once before painting.
    I think you should explain what is your goal and what behavior you want.
    Denis

  • Issues with Importing and Flattening Complex AI files (Flash CS3)

    Is there an easy way to break apart vector graphics imported
    from Adobe Illustrator? My group creates most of the graphics in
    Adobe Illustrator and then we import them into Flash to animate
    them. Unfortunately, with layers and layers on complex drawings,
    Illustrator 3D, clipping masks, compound paths, etc... Flash tends
    to choke. If we take the time to break the graphics apart to a flat
    drawing, it drastically improve speed, and shrinks the file size of
    the resulting swf. Currently we distribute everything to layers,
    break then, and repeat. If there are clipping masks, then we have
    to enter each clipping group movie clip and delete the mask one by
    one to continue breaking the image apart. It's very time consuming
    and reduces our workflow. Is there a better way?
    Thanks in advance....

    So far, I'd like to report on 3 different solutions to this
    problem:
    1. Flattening the image in illustrator, by first, expanding
    any 3D objects (usually a good idea to preserve the original 3D
    either in another file -- keep the original), flattening the
    artwork, then release the clipping masks and compound paths, then
    ungrouping everything, and saving the resulting file (Preferably as
    a new file to keep all the original in case it needs to be adjusted
    later). Then import to flash and break it apart.
    Known Issues: Sometimes, pieces of the Illustrator 3D objects
    will move to the front when you release the clipping masks. You can
    move them back in illustrator or flash to correct the problem.
    2. Export the file from illustrator directly to a swf. Then
    drag that swf into the library and flatten the file from there.
    Known issues: The generated curves are approximated and don't
    always match up perfectly.
    3. Export the file from illustrator to a EPS file format,
    then drag the resulting file into flash.
    Known Issues: The generated curves don't always match up to
    the original and some 3D pieces may end up in front that belong in
    the back.
    4. Export as a raster file.
    Known Issues: You cannot zoom in tight when needed and still
    maintain the crisp lines (unless you rasterize at a very high
    resolution. This will unfortunately result in a large file size.
    The most accurate method for preserving original quality so
    far is the original method from the originating post.

  • Need Help: UTL_FILE Reading and Writing to Text File

    Hello I am using version 11gR2 using the UTL_FILE function to read from a text file then write the lines where it begins with word 'foo' and end my writing to the text file where the line with the word 'ZEN' is found. Now, I have several lines that begin with 'foo' and 'ZEN' Which make for one full paragraph, and in this paragraph there's a line that begins with 'DE4.2'. Therefore,
    I need to write all paragraphs that include the line 'DE4.2' in their beginning and ending lines 'foo' and 'ZEN'
    FOR EXAMPLE:
    FOO/234E53LLID
    THIS IS MY SECOND LINE
    THIS IS MY THIRD LINE
    DE4.2 THIS IS MY FOURTH LINE
    THIS IS MY FIFTH LINE
    ZEN/DING3434343
    FOO/234E53LLID
    THIS IS MY SECOND LINE
    THIS IS MY THIRD LINE
    THIS IS MY FIFTH LINE
    ZEN/DING3434343
    I am only interested in writing the first paragraph tha includes line DE4.2 in one of ther lines Not the Second paragraph that does not include the 'DE4.2'
    Here's my code thus far:
    CREATE OR REPLACE PROCEDURE my_app2 IS
    infile utl_file.file_type;
    outfile utl_file.file_type;
    buffer VARCHAR2(30000);
    b_paragraph_started BOOLEAN := FALSE; -- flag to indicate that required paragraph is started
    BEGIN
    -- open a file to read
    infile := utl_file.fopen('TEST_DIR', 'mytst.txt', 'r');
    -- open a file to write
    outfile := utl_file.fopen('TEST_DIR', 'out.txt', 'w');
    -- check file is opened
    IF utl_file.is_open(infile)
    THEN
    -- loop lines in the file
    LOOP
    BEGIN
    utl_file.get_line(infile, buffer);
         --BEGINPOINT APPLICATION
    IF buffer LIKE 'foo%' THEN
              b_paragraph_started := TRUE;          
         END IF;
         --LOOK FOR GRADS APPS
              IF b_paragraph_started AND buffer LIKE '%DE4%' THEN
              utl_file.put_line(outfile,buffer, FALSE);
    END IF;
         --ENDPOINT APPLICATION      
              IF buffer LIKE 'ZEN%' THEN
         b_paragraph_started := FALSE;
              END IF;
    utl_file.fflush(outfile);
    EXCEPTION
    WHEN no_data_found THEN
    EXIT;
    END;
    END LOOP;
    END IF;
    utl_file.fclose(infile);
    utl_file.fclose(outfile);
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20099, 'Unknown UTL_FILE Error');
    END my_app2;
    When I run this code I only get one line: DE4.2 I AM MISSING THE ENTIRE PARAGRAPH
    PLEASE ADVISE...

    Hi,
    Look at where you're calling utl_file.put_line. The only time you're writing anything is immediately after you find the the key word 'DE4', and then you're writing just that line.
    You need to store the entire paragraph, and when you reach the end of the paragraph, write the whole thing only if you found the key word, like this:
    CREATE OR REPLACE PROCEDURE my_app2 IS
        TYPE  line_collection  
        IS       TABLE OF VARCHAR2 (30000)
               INDEX BY BINARY_INTEGER;
        infile               utl_file.file_type;
        outfile                      utl_file.file_type;
        input_paragraph          line_collection;
        input_paragraph_cnt          PLS_INTEGER     := 0;          -- Number of lines stored in input_paragraph
        b_paragraph_started      BOOLEAN      := FALSE;     -- flag to indicate that required paragraph is started
        found_key_word          BOOLEAN          := FALSE;     -- Does this paragraph contain the magic word?
    BEGIN
        -- open a file to read
        infile := utl_file.fopen('TEST_DIR', 'mytst.txt', 'r');
        -- open a file to write
        outfile := utl_file.fopen('TEST_DIR', 'out.txt', 'w');
        -- check file is opened
        IF utl_file.is_open(infile)
        THEN
         -- loop lines in the file
         LOOP
             BEGIN
              input_paragraph_cnt := input_paragraph_cnt + 1;
                 utl_file.get_line (infile, input_paragraph (input_paragraph_cnt));
              --BEGINPOINT APPLICATION
              IF LOWER (input_paragraph (input_paragraph_cnt)) LIKE 'foo%' THEN
                  b_paragraph_started := TRUE;
              END IF;
              --LOOK FOR GRADS APPS
              IF b_paragraph_started
              THEN
                  IF  input_paragraph (input_paragraph_cnt) LIKE '%DE4%'
                  THEN
                   found_key_word := TRUE;
                  END IF;
                  --ENDPOINT APPLICATION
                  IF input_paragraph (input_paragraph_cnt) LIKE 'ZEN%' THEN
                      b_paragraph_started := FALSE;
                   IF  found_key_word
                   THEN
                       FOR j IN 1 .. input_paragraph_cnt
                       LOOP
                           utl_file.put_line (outfile, input_paragraph (j), FALSE);
                       END LOOP;
                   END IF;
                   found_key_word := FALSE;
                   input_paragraph_cnt := 0;
                  END IF;
              ELSE     -- paragraph is not started
                  input_paragraph_cnt := 0;
              END IF;
              EXCEPTION
                  WHEN no_data_found THEN
                   EXIT;
              END;
          END LOOP;
        END IF;
        utl_file.fclose (infile);
        utl_file.fclose (outfile);
    --EXCEPTION
    --    WHEN OTHERS THEN
    --        raise_application_error(-20099, 'Unknown UTL_FILE Error');
    END my_app2;
    SHOW ERRORSIf you don't have an EXCEPTION section, the default error handling will print an error message, spcifying exactly what the error was, and which line of your code caused the error. By using your own EXCEPTION section, you're hiding all that information. I admit, the error messages aren't always as informative as we'd like, but they're never less informative than "Unknown UTL_FILE Error'. Don't use your own EXCEPTION handling unless you can improve on the default.
    Remember that anything inside quotes is case-sensitive. If your file contains upper-case 'FOO', then it won't be "LIKE 'foo%' ".
    Edited by: Frank Kulash on Dec 7, 2011 1:35 PM
    You may have noticed that this site normally doesn't display multiple spaces in a row.
    Whenever you post formatted text (such as your code) on this site, type these 6 characters:
    \{code}
    (small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.

  • Big issues with Leopard and writing to NAS units or Windows servers

    Quick run down of the issues
    1st client has a number of G5's all running 10.5.2
    NAS units running embedded Windows SBS 2003 or Windows Storage .
    All shares have worked fine before the macs were upgraded to Leopard.
    Now the macs can see the shares, mount and write to the folders. But immediately afterwards all inherited permissions are stripped from the folders/files and only the owner of the file/folder can access them. All other mac users have no access. It seems that Leopard is ignoring the inherited permissions of the share and just applying its own.
    2nd Client
    Number of imacs running 10.5.2. Can see the mac shares on the server running Windows SBS 2003 fine. The minute any files are copied you get the progress of the items being copied, seems to appear on the server and then just hangs.
    In most circumstances the copying crashes the whole server.
    Have tried binding the imacs to AD, but no joy. SMB sharing (with Appletalk turned off) dosent help either.
    Somewhere there seems to be some gremlins with AFP and windows shares
    Anyone have similar issues or bright ideas ?

    Alright I'm running into the same issue with my iMac 10.5.2 connecting to windows server 2003 r2. I'm about to go nuts, I can log on to the server, open files manipulate them and sometimes I'm able to save that file back to server but I'm unable to transfer almost anything new to the server, (I can create new folders though). When you try to transfer something to the server I get "progress of the items being copied, seems to appear on the server"... then it hangs, a corrupt file is left on the server. If you try and open that file I get an error message on my mac, "OS X is currently using this file" on a pc it will say the file is corrupt. I'm forced to carry my psd files on a flash drive and walk to coworkers machines to upload it to the server... (haven't had time to set up parallels). I'm the only mac in the office and I'm seeing why I've been so spoiled at past jobs where its 100% macs.

  • Having issues with SP9 and IDMUI5/IDMREST SCA files

    Hello,
    I've been working through an upgrade to SP9 and have run into two issues related to some SCA files. I'm hoping others might be able to shed some light on how to resolve them. The issues primarily focus on unresolved dependencies for files I'm unable to locate.
    *Prior to performing this upgrade I downloaded all relevant SP9 files.
    In performing this upgrade, I've followed these steps:
    1) update database schema. completed successfully
    2) upgrade the runtime components. completed successfully
    3) upgrade the management console. completed successfully
    4) deploy IDM user interface on NW 7.3. This is where I ran into problems.
    Problem #1 - the IDMUI5 SCA file does not pass the validation check.
    - it states there is an unresolved dependency.
    - sap.com/tc~idm~rest~ear was not found
    Problem #2 - the IDMREST SCA file does not pass the validation check.
    - it states there are two unresolved dependencies
    - sap.com/tc~odata4j~primary was not found
    - sap.com/tc~jax~rs~primary was not found
    What I'd like to understand is where the files required by IMDUI5 and IDMREST exist and how to complete the upgrade for them.
    Thanks, Paul

    I think this is the odata4 that you need for 7.3
    SCA
    ODATACXFEXT11_0-10012140.SCA
    SP11 for SAP ODATA4J+CXF-REST LIB 7.30
    0
    Info
    10352
    26.02.2014
    This might be the only package you need; it might be in your best interest to avoid manually downloading files and rely upon Solution Manager's MOpz feature to query your IdM system and let it track down all the needed packages.

  • Reading and writing non-English files

    Hi there..
         I wonder if anyone can tell me how to read and write non-English language files like French or Arabic files...
    Im also interested in knowing how can i convert from Unicode to ASCII and vice versa..
         thanx.. Mourad

    hi there ..
    thanx for ur cooperation .. but actually i have tried the following code and it didnt work; so, im looking for more help :)
    esp. if there are any notes about the files themselves for example;
    by the way i used Notepad files in unicode format..
    my code is :
    import java.io.*;
    public class MainClass {
    public static void main(String args[]){
    String inputfile = "arabic.txt";
    String outfile = "outfile.txt";
    try{
    RandomAccessFile raf = new RandomAccessFile(inputfile, "r");
    InputStreamReader isr = new InputStreamReader(
    new FileInputStream(inputfile), "Cp1256");
    OutputStreamWriter osw = new OutputStreamWriter(
    new FileOutputStream(outfile), "Cp1256");
    for(int i=0; i<raf.length(); i++)
    osw.write(isr.read());
    osw.close();
    }catch(UnsupportedEncodingException uee){
    System.out.println("UEException: "+ uee.getMessage());
    }catch(FileNotFoundException fnfe){
    System.out.println("FNFException: "+ fnfe.getMessage());
    }catch(IOException ioe){
    System.out.println("IOException: "+ ioe.getMessage());
    thanx again..Mourad

  • READING AND WRITING FROM A FILE(WRITTEN IN ANOTHER LANGUAGE)

    # Comment
    INTEGER Declares integer type variable
    STRING Declares string type variable
    LET Assigns a variable
    CALCULATE Performs an arithmetic calculation
    PRINT Writes data to the console
    PRINTLN As print, but followed by a new line
    END Terminates the program
    Each line of the program must begin with one of these words, and the language should not be case sensitive.
    Tim Brailsford, 2007
    G64ICP
    COMMENT
    Any line beginning with the # character is completely ignored.
    Example:
    # ignore this line!
    INTEGER
    The INTEGER reserved word declares an Integer variable, and assigns a default value of 0 to it.
    Example:
    INTEGER myInt
    This example is equivalent to the Java statment "int myInt=0;"
    STRING
    The STRING reserved word declares a String variable, and assigns an empty string to it.
    Example:
    STRING myString
    This is equivalent to the Java statement "String myString;"
    LET
    This assigns values to variables (either integers, or strings enclosed
    in double quotes).
    Examples:
    LET myInt=42
    LET myString="Hello World!"
    CALCULATE
    This performs numeric calculations upon values or variables, and assigns the result to a variable (which must have
    been declared earlier). Four operators are supported: + *
    and / (for addition, subtraction multiplication and
    integer division respectively).
    Examples:
    CALCULATE myInt=2*2
    CALCULATE myInt=myInt+24
    CALCULATE myInt=intA/intB
    PRINT and PRINTLN
    These words both print to the console the
    only difference being that PRINTLN appends a new line (as does
    System.out.println in Java). These can print either text provided as an argument, or variables (string or integer).
    Examples:
    PRINTLN "Hello World!"
    PRINT myString
    PRINTLN myInt
    END
    This terminates the program, and prints a message to that effect.
    TPL Example
    To the left is an example TPL input file , to
    calculate the factorial of 5. This should produce
    an output similar to that shown overleaf (except
    that calculates the factorial of 10).
    # A TPL Program to calculate the factorial of 5
    INTEGER myInt
    INTEGER factorial
    STRING myString
    LET mystring="Factorial Program"
    LET myInt=5
    CALCULATE factorial=myInt*4
    CALCULATE factorial=factorial*3
    CALCULATE factorial=factorial*2
    Tim Brailsford, 2007
    G64ICP
    PRINTLN mystring
    PRINTLN
    PRINT "The factorial of "
    PRINT myInt
    PRINT " is "
    PRINTLN factorial
    END
    Documentation
    Document your code by writing instructions explaining how to run it, listing all of the files you have submitted,
    and specifying any limitations (eg you might want to say what platforms you would expect it to run on, and what
    platforms you have tested it on). This document should be written as a plain text file (ie ASCII � MS Word binary
    files are not acceptable) � and this file should be called README.TXT. This file should constitute the user
    manual of your program, and should explain exactly how to use your program.
    The README file should be the user manual for your language as implemented.
    NB:
    I want it to read values from the file as given above and execute the answer in the command prompt( as intented in the file above)
    Thanks
    Alam Ikenna

    Hai I have one doubt in doing other peoples homework for them. Why bother?

  • Reading and writing u16 binary file to a new file

    Hello all,
    a very simple thing that I just don't seem to be able to figure out. I have a file containing 1024bytes of unsigned 16bit words. I can read it successfully with the right value  being displayed. But then I try to write these values to a new file, I can no longer read the same value (in fact it's all grayed out 0) from the newly written file. The newly written file has the right size 1024 bytes, but I don't seem to obtain the right information. I made sure the endian are the same, little-endian.
     Attached is my basic VI, and the .dat file is the file containing the binary information. 
    I'm not using copy file because once I get this figure out, I'll need to append more of the Scan.dat file to one single file. 
    Thank you!
    Solved!
    Go to Solution.
    Attachments:
    read_write_binary_u16.zip ‏11 KB

    I would put some wait time between the write and the read.  It may be a good idea to actually close the file in between.
    I have a feeling that you may not have allowed enough time to actually have the file written out before you read it again.  That or since it is still open, the file pointer is at the end of the file and you are trying to read all the bytes starting at the end, which means you get nothing.
    Not sure of the exact issue, but those two things comes to mind.

  • Help on reading and writing to a file !!!!!!!!!!!!!!!!

    hi there
    anyone can help me on how to write and read from a file? how can i read one string at a time instead of a char. thank you.

    Use the StringTokenizer to break up the line
    File newFile = new File("text.txt");
    BufferedReader in = new BufferedReader(new FileReader (newFile));
    String line;
    while((line = in.readLine()) != null){
    StringTokenizer st = new StringTokenizer(inputLine, " ");
    while(st.hasMoreTokens()){
    // do something with the token
    // e.g:
    // String lc = st.nextToken().toLowerCase()
    hope that helps

  • UTL_FILE: Reading and Writing client-side Files

    Hi All,
    Please tell me how to read & write UTL_FILE at client-side
    Regards

    And you need this XML to be generated on and read from a client machine? You can't generate the file on the server, move it to the new server, and import it?
    If you need to generate files on the client machine, the client application would have to do the file I/O. Java has a number of libraries for generating XML and parsing XML that could be used, for example, but that implies that a Java application has been deployed to the client machine.
    Justin

  • File importer detected an inconsistency in the file stucture of (file name). Reading and writing this file's metadata (XMP) has been disabled.

    I have duplicated a project to work on another computer. The project opens fine but when I import new footage/audio files I get this message. "File importer detected an inconsistency in the file stucture of (file name). Reading and writing this file's metadata (XMP) has been disabled." Then I can't play my timeline and Premier Pro crashes.  I have to force quit and restart my computer to continue working. What does this error really mean? How do you rectify?
    Our workflow requires that we duplicate projects to make updates because we are frequently revising but need to keep original project unchanged and intact.

    I have a similar issue and message , but occurs when I import AVI clips from OnLocation CS4 to Premier Pro CS4.

  • Reading and writing to and from a file to a form

    Hi there
    I would like somebody to send me a code example,
    showing me how to reading records from a file to a form,
    and writing records to the same file from the same form.
    I know that I have to use sycronize, but I just have not been
    successful. I can constract forms, go from form to a form,
    do buttons, do text fields. I can even read and write from and
    to files. However I cannot do is write from a file to a form and
    from a form to a file.
    could somebody please explain how this done, and could you
    please give me a code example. All the books seem to either
    deal with forms or with files. None seem to combine both.
    I am sure it is very ease to do if ONLY I knew how!!!
    thank you very much in advance for you help.

    I understand that code and I have used it before, however thanks for
    trying to help me, it is really appreciated. However, that is not my
    problem. I can read and write from a file to the console and vice versa.
    what I cannot do, no matter how hard I try, is to write from a file, and
    output it in.
    I will tell you how far I have got.
    I have a MenuFrame class, this is the code for it:
    package WorkflowApp;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    public class MenuFrame extends JFrame {
    JMenuBar menuBar1 = new JMenuBar();
    JMenu menuFile = new JMenu();
    JMenuItem menuFileExit = new JMenuItem();
    JMenu menuHelp = new JMenu();
    JMenuItem menuHelpAbout = new JMenuItem();
    JToolBar toolBar = new JToolBar();
    JButton jButton1 = new JButton();
    JButton jButton2 = new JButton();
    JButton jButton3 = new JButton();
    ImageIcon image1;
    ImageIcon image2;
    ImageIcon image3;
    JLabel statusBar = new JLabel();
    Button button2 = new Button();
    Button button3 = new Button();
    Button button4 = new Button();
    Button button5 = new Button();
    Button button6 = new Button();
    Button button7 = new Button();
    Button button1 = new Button();
    //Construct the frame
    public MenuFrame() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    //Component initialization
    private void jbInit() throws Exception {
    image1 = new ImageIcon(WorkflowApp.MenuFrame.class.getResource("openFile.gif"));
    image2 = new ImageIcon(WorkflowApp.MenuFrame.class.getResource("closeFile.gif"));
    image3 = new ImageIcon(WorkflowApp.MenuFrame.class.getResource("help.gif"));
    this.getContentPane().setLayout(null);
    this.setSize(new Dimension(400, 492));
    this.setTitle("MenuFrame");
    statusBar.setText(" ");
    statusBar.setBounds(new Rectangle(0, 0, 3, 17));
    menuFile.setText("File");
    menuFileExit.setText("Exit");
    menuFileExit.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    fileExit_actionPerformed(e);
    menuHelp.setText("Help");
    menuHelpAbout.setText("About");
    menuHelpAbout.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    helpAbout_actionPerformed(e);
    jButton1.setIcon(image1);
    jButton1.setToolTipText("Open File");
    jButton2.setIcon(image2);
    jButton2.setToolTipText("Close File");
    jButton3.setIcon(image3);
    jButton3.setToolTipText("Help");
    toolBar.setBorder(null);
    toolBar.setBounds(new Rectangle(2, 2, 389, 30));
    button2.setBounds(new Rectangle(217, 62, 135, 44));
    button2.setLabel("Staff Details");
    button2.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    button2_actionPerformed(e);
    button3.setBounds(new Rectangle(26, 127, 135, 44));
    button3.setLabel("Arange Viewing");
    button3.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    button3_actionPerformed(e);
    button4.setBounds(new Rectangle(218, 127, 136, 41));
    button4.setLabel("Valuation");
    button4.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    button4_actionPerformed(e);
    button5.setBounds(new Rectangle(28, 196, 135, 41));
    button5.setLabel("Schedule");
    button6.setBounds(new Rectangle(221, 194, 133, 40));
    button6.setName("button6");
    button6.setLabel("Register Interest");
    button7.setBounds(new Rectangle(31, 266, 133, 42));
    button7.setLabel("Register Offers");
    button1.setBounds(new Rectangle(27, 62, 131, 42));
    button1.setLabel("New Client");
    button1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    button1_actionPerformed(e);
    menuFile.add(menuFileExit);
    menuHelp.add(menuHelpAbout);
    menuBar1.add(menuFile);
    menuBar1.add(menuHelp);
    this.setJMenuBar(menuBar1);
    this.getContentPane().add(statusBar, null);
    this.getContentPane().add(toolBar, null);
    toolBar.add(jButton1);
    toolBar.add(jButton2, null);
    toolBar.add(jButton3, null);
    this.getContentPane().add(button3, null);
    this.getContentPane().add(button5, null);
    this.getContentPane().add(button7, null);
    this.getContentPane().add(button2, null);
    this.getContentPane().add(button4, null);
    this.getContentPane().add(button6, null);
    this.getContentPane().add(button1, null);
    //File | Exit action performed
    public void fileExit_actionPerformed(ActionEvent e) {
    System.exit(0);
    //Help | About action performed
    public void helpAbout_actionPerformed(ActionEvent e) {
    MenuFrame_AboutBox dlg = new MenuFrame_AboutBox(this);
    Dimension dlgSize = dlg.getPreferredSize();
    Dimension frmSize = getSize();
    Point loc = getLocation();
    dlg.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
    dlg.setModal(true);
    dlg.show();
    //Overridden so we can exit on System Close
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if(e.getID() == WindowEvent.WINDOW_CLOSING) {
    fileExit_actionPerformed(null);
    void button2_actionPerformed(ActionEvent e) {
    StaffDetails myFrame = new StaffDetails();
    myFrame.show();
    void button3_actionPerformed(ActionEvent e) {
    ArrangeViewing myFrame = new ArrangeViewing();
    myFrame.show();
    void button1_actionPerformed(ActionEvent e) {
    NewClientFrame myFrame = new NewClientFrame();
    myFrame.show();
    // System.exit(1);
    void button4_actionPerformed(ActionEvent e) {
    Valuation myFrame = new Valuation();
    myFrame.show();
    then I have a new form class, this is the code for it
    package WorkflowApp;
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class NewClientFrame extends JFrame {
    Label label1 = new Label();
    Label label2 = new Label();
    Label label3 = new Label();
    Label label4 = new Label();
    Label label5 = new Label();
    Label label6 = new Label();
    Label label7 = new Label();
    Label label8 = new Label();
    Label label9 = new Label();
    Label label10 = new Label();
    TextField textField1 = new TextField();
    TextField textField2 = new TextField();
    TextField textField3 = new TextField();
    TextField textField4 = new TextField();
    TextField textField5 = new TextField();
    TextField textField6 = new TextField();
    TextField textField7 = new TextField();
    TextField textField8 = new TextField();
    TextField textField9 = new TextField();
    TextField textField10 = new TextField();
    Button button1 = new Button();
    Button button2 = new Button();
    //Construct the frame
    public NewClientFrame() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    //Component initialization
    private void jbInit() throws Exception {
    this.getContentPane().setLayout(null);
    this.setSize(new Dimension(411, 488));
    this.setTitle("NewClientFrame ");
    this.addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    this_windowClosing(e);
    label1.setBounds(new Rectangle(21, 23, 110, 23));
    label1.setAlignment(2);
    label1.setText("Assign Number");
    label2.setBounds(new Rectangle(23, 57, 108, 25));
    label2.setAlignment(2);
    label2.setText("Name");
    label3.setBounds(new Rectangle(40, 91, 94, 24));
    label3.setAlignment(2);
    label3.setText("Address 1");
    label4.setBounds(new Rectangle(21, 124, 112, 29));
    label4.setAlignment(2);
    label4.setText("Address 2");
    label5.setBounds(new Rectangle(20, 159, 116, 29));
    label5.setAlignment(2);
    label5.setText("PoscCode");
    label6.setBounds(new Rectangle(18, 197, 119, 26));
    label6.setAlignment(2);
    label6.setText("Telephone");
    label7.setBounds(new Rectangle(25, 228, 112, 26));
    label7.setAlignment(2);
    label7.setText("Other Telephone");
    label8.setBounds(new Rectangle(12, 261, 125, 24));
    label8.setAlignment(2);
    label8.setText("Email Address");
    label9.setBounds(new Rectangle(6, 301, 138, 25));
    label9.setAlignment(2);
    label9.setText("Staff Assigned (Name)");
    label10.setBounds(new Rectangle(22, 341, 124, 23));
    label10.setAlignment(2);
    label10.setText("Staff Assigned (No.)");
    textField1.setBounds(new Rectangle(155, 19, 80, 26));
    textField2.setBounds(new Rectangle(155, 58, 193, 24));
    textField3.setBounds(new Rectangle(156, 90, 192, 25));
    textField4.setBounds(new Rectangle(157, 126, 192, 23));
    textField5.setBounds(new Rectangle(157, 159, 195, 25));
    textField6.setBounds(new Rectangle(157, 194, 195, 26));
    textField7.setBounds(new Rectangle(157, 230, 192, 24));
    textField8.setBounds(new Rectangle(157, 263, 193, 25));
    textField9.setBounds(new Rectangle(157, 303, 196, 24));
    textField10.setBounds(new Rectangle(158, 337, 95, 24));
    button1.setBounds(new Rectangle(23, 398, 144, 34));
    button1.setLabel("Staff Available");
    button2.setBounds(new Rectangle(211, 396, 148, 34));
    button2.setLabel("Submit Record");
    button2.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    button2_actionPerformed(e);
    this.getContentPane().add(label1, null);
    this.getContentPane().add(label2, null);
    this.getContentPane().add(label3, null);
    this.getContentPane().add(label4, null);
    this.getContentPane().add(label5, null);
    this.getContentPane().add(label6, null);
    this.getContentPane().add(label7, null);
    this.getContentPane().add(label8, null);
    this.getContentPane().add(label9, null);
    this.getContentPane().add(label10, null);
    this.getContentPane().add(textField1, null);
    this.getContentPane().add(textField2, null);
    this.getContentPane().add(textField3, null);
    this.getContentPane().add(textField4, null);
    this.getContentPane().add(textField5, null);
    this.getContentPane().add(textField6, null);
    this.getContentPane().add(textField7, null);
    this.getContentPane().add(textField8, null);
    this.getContentPane().add(textField9, null);
    this.getContentPane().add(textField10, null);
    this.getContentPane().add(button1, null);
    this.getContentPane().add(button2, null);
    public void fileExit_actionPerformed(ActionEvent e) {
    System.exit(0);
    // exit(this);
    // close();
    //Overridden so we can exit on System Close
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if(e.getID() == WindowEvent.WINDOW_CLOSING) {
    System.exit(0);
    void button2_actionPerformed(ActionEvent e) {
    // myFrame.close();
    this.dispose();
    void this_windowClosing(WindowEvent e) {
    this.dispose();
    I also have an about box, staff details, and valuation forms.
    what I am trying to do is for the New client form to be able to read and write from and to a file, and display the info.
    I am working in JBuilder3, a bit out of date I know, but it is the best I can do. Any Ideas how to do this.

Maybe you are looking for

  • Can you please help me change the name of my device in iPhoto?

    I am trying to find out a way to change my new sony dsc-h70 camera from "no name" to it's proper name in iphoto. I've googled it, but cannot find any information other than you can change the name in Finder. I cannot figure out how to do this and hav

  • 3D Space Mouse as FCP-X Controller?

    Has anyone managed to do this? It seems like a natural, with rotation for shuttle, Z axis for zoom, X axis for frame by frame or edit by edit navigation. Failing that, does anyone have comments on something like the Contour Shuttle-eXpress or the lik

  • Nokia 5800 gallery

    Is there any way of telling my Nokia 5800 to exclude certain areas or folders of the either the phone memory and/or memory card? Basically I use a program called MapNav.  It builds up a cache of map tiles which are PNG files.  Now when I use the Gall

  • Nokia Messaging Not Synching all message ?

    Hi - I have been synching my googlemail account with my Nokia E63 without any problems for some time.  However, when I look now - none of my messages are there from  between the 16th June and 23rd June?  I have messages from 9, 10th, 11th, 12, 13, 16

  • Cannot fields of objects nested in a Datacontrol in UIX

    Every time I drag & drop (as a table) a DataControl that has several normal fields and also some nested objects, on a UIX page, I can see while running the application all of the values associated to the fields, but I have no way to see values/fields