How does Java file I/O move files?

I'm working support for an integration platform, and there's a problem at a customer that seems to crop up once in a blue moon, yet still all to often. Its a bit difficult to track down, because they are using an old piece of software that is not officially supported anymore, but the problem still needs to be solved and I could use some help to either confirm or dismiss my suspicion of what might be the cause of it.
What happens is this....
Their system places a file in a folder, and the file is /supposedly/ fully created, and then just moved to the folder. Then an adapter program takes the file, puts it on a messaging queue, and after that is successful, it moves the file into a backup directory.
Now, what has happened is that sometimes, the files that end up being sent are incomplete. Either the writing application messed up, or the adapter somehow went crazy. But more puzzling is that I've observed that the files have been correctly sent, but the file that ended up in the backup-directory was empty. It is not possible to send an empty file through the platform, since there's transformation logic that handles it. Those parts I completely trust, but I need to verify if it might indeed be the adapter, or the customer's own systems that messes up the message.
So the question really boils down to, how does the java file-I/O method for moving a file work? Does it copy it bitwise, or does it call the system's move-command? Because if it copies it bitwise, it might mean it reads the data at the exact moment the file is created but not yet filled, and then doesn't check again as it writes it to the storage, and then just deletes the file. If it calls the system's move command, the system wouldn't be able to move a file that is being written, and something else is more likely the problem.
The machine is a windows 2000 server, sp4, and the java being used is jdk1.3.1_03.
Rewriting the adapter is not an option, and it will hopefully be replaced in the near future (as in, within a year...) whenever the customer deems it can budget for the work. The adapter is not officially supported by us, but the platform is, and I need to pin-point the problem.

So the question really boils down to, how does the
java file-I/O method for moving a file work? Does it
copy it bitwise, or does it call the system's
move-command? It could be either one. Both are available, so it depends what the programmer for that tool decided to use.
Without more details, it's impossible to be sure what the probem is, but a couple of general possibilities that fit what you've described pop to mind:
* The copy/move/send step is happening before the file being written is flushed or closed. This might be because an exception in the writing code is causing the flush/close to be skipped entirely.
* The copy/move/send is being called too soon.
* The step that's reading the file after its been copied/moved/sent is ocurring before the file is completely there.

Similar Messages

  • I recently purchased QuickTime 7 Pro to convert avi files to mov files for editing on Imovie. However, QuickTime won't play the files. How can I get them to play and how can I convert them to mov files?

    I recently purchased QuickTime 7 Pro to convert avi files to mov files for editing on Imovie. However, QuickTime won't play the files. How can I get them to play and how can I convert them to mov files?

    I recently purchased QuickTime 7 Pro to convert avi files to mov files for editing on Imovie. However, QuickTime won't play the files. How can I get them to play and how can I convert them to mov files?
    Both the AVI and the MOV file extensions refer to the file container and not the compressed data the file contains. Both are generic file containers in that each may contain any valid combination of audio and/or video data that is compatible with the codec component configuration of the system on which the file was created. On the other hand, whether a file is playback compatible, conversion compatible, and/or edit compatible depends on the data actually contained in the file container. So, you are basically dealing with two separate issues here—the container and what is inside it.
    Basically, if you want to make your files ediit compatible with iMovie, you must change your file container to one that is acceptable to iMovie and convert the data to edit compatible audio and/or video compression formats as may be necessary. The best approach is to determine what codecs were actually used to create the original AVI files and add them to your system if possible. In most cases a codec package like Perian can be added to your system's codec component configuration to may the AVI file playable. Once they are playable, in the QT 7 app then they can be chnged or converted to file types and compression formats that can be edited in iMovie. (While Perian handles most codecs commonly used to create AVI files, it does not handle all possibilities and, while the Perian codec package still works under cureent Mac OS versions, its development group has decided to drop further development/support of the package.)
    Background: AVI is a file container originally developed by Microsoft back in 1992 but for which official support was discontinued about 11 years. Despite its limitations, Windows users still tend to use this file based on its open source ease of use and generic nature, thus, making its use so popular that most users are unwilling to switch to more modern but less generic file types. Since some AVI legacy compression formats have never been transcoded for the Mac or use beyond OS 9 or OS X PPC platforms, it is often important to know what specific compression formats are contained in the AVI file to know which codecs to add to your system and which not to add in order to avoid possible codec conflicts.
    You can use many different converters to convert AVI files to iMovie edit compatible files. Most third-party apps contain their own buit-in codecs which do not relay on the Mac codec component configuration. Free ones, like HandBrake, usually have limited conversion capabilities while those that have more varied outputs are usually commercial in nature and will cost you additional cash. QT 7 Pro or the free MPEG Streamclip app allow you to access you own system's component configuration and use any available codec component like DV, AIC, MPEG-4, H.264, Photo JPEG, etc.—all of which are iMovie compatible for editing purposes—but only after making the AVI file QT 7 player compatible.
    In order to determine what compression formats wewre used in your AVI files you can
    1) Try checking the Finder "Info" window,
    2) Use the "Inspector", "Media Info", or "Properties" window of any player app that will open the file, or
    3) Use a general media utility app like "MediaInfo" to read the file characteristics.

  • How can I sav an emailed .mov file to my iPad?

    How can I sav an emailed .mov file to my iPad?

    Yes there is, if you hold down the attachment widget in the email once the video is downloaded, it will give you a series of options to save it to, including camera roll. 
    Hope this solves your question. 
    Cheers,
    Allen

  • HT204382 how can i play an AVI movie file on my mac????????

    how can i play an AVI movie file on my macbook??????

    Or download and install the free MPlayerX from the App Store.

  • How do I copy a large MOV file from iMac to iPad?

    How do I copy a large MOV file from iMac to iPad? Thank you in advance for the help. I am connected via a USB but finder is not showing my iPad.

    Open iTunes, drag the MOV file to your library in iTunes, then sync to the iPad.

  • How to save iMovie project as .mov file?

    That's my question!

    Dr.E wrote:
    How to save iMovie project as .mov file?
    That's my question!
    Share/Export with Quicktime
    That's my answer, and Welcome, Dr.E to the  boards ...

  • How does APEX create and save new files. What extension does it save in?

    Hi can someone help me with this question?
    How does APEX create and save new files. What extension does it save in?
    Cheers!
    VJ

    It's really too bad we can't see VJ's face when the concept sinks in. This is one of my favorite moments when teaching APEX classes. Most people love it, some people don't. If nothing else it really proves the power and performance of the Oracle database. Each page view can generate 40+ queries, yet on the average system this takes less than .04 seconds.
    Keep in mind there are no undocumented features or "Oracle Internals" that the APEX team uses to achieve this performance, just sound database design. With every feature they add they evaluate how it will be used and design the tables and indexes to most efficiently answer the query. Sometimes this means going against "purist" normalized principals.

  • How does iTunes use or access existing files?

    how does iTunes use or access existing files? My existing windows music folder is about 2GB in size. When moving to iTunes, will iTunes just access those existing files or will it make an actual copy of all the songs? Thanks!

    http://support.apple.com/kb/HT1549?viewlocale=en_US

  • How can I convert a MP4 file to a MOV file to be viewed on my windows PC?

    How do I convert a MP4 movie file to a MOV fIle so I can view it on a Windows PC?

    Hello, there are many such software can convert the file format, the conversion from MP4 to MOV format, avi formats to MP4 formats, these formats are supported, you can try this software, supports converting various formats , this software is free to download the trial, I have been using.
    I hope you can help.

  • How do I convert an SWF file to a MOV file with Flash 8?

    I have all the files that created the SWF (this is something that was developed on my computer, not an SWF I took off the internet)

    I haven't seen Flash 8 in a long time. Take a look at the export options if it was already there: Main menu -> File -> Export -> Export movie -> file extension *.mov

  • Premier After Effects... How does one places the whole movie clip into AF?

    After years of using Premiere, I’m looking at using After Effects. Premiere does most of what I need (I don’t need moving graphics and titles) but the masking and rotoscoping seems to be better in After Effects. I’ve started a great video by Tom Green at school. This is probably silly question- I don’t understand is how does one places the whole movie clip into AF? I only see 30 seconds or so of the 5 minute clip on the timeline in AF.

    Ahh, thanks. I simply add more minutes (the length of the clip) into the "new composition".
    A new problem: When I try a dynamic link with premiere AE says “Failed to connect to adobe Premiere Pro Dynamic Link”, but PP will link with AE. I just installed AF last week. Do I need to uninstall and reinstall them (along with the rest of the Creative Suite)?

  • How does java support the concept of destructor?

    How does java support the concept of destructor?

    @KunalSurana: before you flood the forum with basic questions, do us a favour and read.
    [Sun's basic Java tutorial|http://java.sun.com/docs/books/tutorial/]
    [Sun's New To Java Center|http://java.sun.com/learning/new2java/index.html]
    Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    jGuru
    A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch
    To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    [Yawmarks List|http://forums.devshed.com/java-help-9/resources-for-learning-java-249225.html]
    [The Java Developers Almanac|http://www.amazon.com/exec/obidos/tg/detail/-/0201752808?v=glance]
    [http://javaalmanac.com|http://javaalmanac.com]
    Bruce Eckel's [Thinking in Java(Available online.)|http://mindview.net/Books/DownloadSites]
    Joshua Bloch's [Effective Java|http://www.amazon.co.uk/exec/obidos/Author=Bloch,%20Josh]
    Bert Bates and Kathy Sierra's [Head First Java|http://www.amazon.com/exec/obidos/tg/detail/-/0596004656?v=glance ]
    James Gosling's [The Java Programming Language|http://www.bookpool.com/sm/0321349806]
    Gosling is the creator of Java. It doesn't get much more authoritative than this.
    Joshua Bloch and Neal Gafter [Java Puzzlers.|http://www.javapuzzlers.com/]

  • How does java implements runtime polymorphism.?

    Hi all.
    we know how does runtime polymorphism take place in java.
    But my quesions is , how does java implement it internally.
    in C++, with the use of keyword virtual , complier decides to make a call at runtime using virtual table and Vptr.
    like in c++,
    class base {
    public:
    virtual void show(){
    cout<<"I am in base class"<<endl;
    class child : public base {
    public:
    void show(){
    cout<<" I am in child class"<<endl;
    int main(){
    base*p = new child();
    p->show();
    return 0;
    out put - I am in child class.
    but if we remove the virtual keyword then output
    I am in base class..
    We know how it happens
    but in java
    class base {
    void show(){
    System.out.println("I am in base class");
    class child extends base {
    void show(){
    System.out.println(" I am in child class");
    class demo {
    public static void main(string args[ ]){
    base b;
    child c = new child();
    b = c;
    b.show();
    output is - I am in child class
    but how can i bring the output as
    I am in base class ---
    complier knows that b is base reference so y doesnt it just use base version.

    if all methods are virtual..then we should always have runtime binding but we do have early biding too.
    shouldnt we able to call base verison using a base reference variable like in c++.
    May be I m mixing big times java n c++. But it seems to me as core java is much like c++ . The things u can do in c++ , u can do same in java in different ways.

  • How does java.exe behave if I only use -Xmsn option?

    Hi,
    if I only set the -Xmsn option and do not set -Xmxn option when I launch my Java application, how does java.exe behave? Does the heap will automatically grow like what Bea's JRockit does when my application requires more memory?
    I use JDK 5.0.
    Thanks for your help!

    If your application needs the space, the JVM will grow the heap up to the
    default value of -Xmx. Note that it will run a garbage collection cycle before
    expanding the heap, and it may take a few or several cycles to expand to
    the -Xmx value. How fast or slow it expands depends somewhat on the
    behavior of your application (how much it allocates and how long the
    objects live).
    The default value of -Xmx depends on the platform; see
    http://java.sun.com/docs/hotspot/gc5.0/ergo5.html.

  • Shake Crashes when using "file-in" on .mov files.

    Using file-in on .mov files crashes Shake, worked fine before upgrading itunes. Do I need to get a new codec into Shake so it recognizes the new QuickTime?

    upgraded from OS 10.3.9 to 10.4, upgrade fixed the problem. Now QT loads fine into Shake.

  • How does FCP7 user export QT. movie to DNxHD codec, MXF OP1a wrapper format

    dear sir, madam,
    How does FCP7 user export QT. movie to DNxHD codec, MXF OP1a wrapper format

    Not in Classic.  Use this forum guide to learn where to post.  Suggest once you find where might have the answers, to combine both questions, so you don't have to keep searching for the answers in two places:
    https://discussions.apple.com/docs/DOC-2463

Maybe you are looking for

  • Urgent:SUS PO not appearing in the PO list for vendor's user

    Hi experts,                    I am working on SUS. SRM5.0 single box scenario. PO is created by the purchaser and is successfully transfered through XI. But this PO is not appearing in the PO list of vendor's user. Please let me know what can be the

  • Maximum size of a PDF

    I've been adding to a dbase for years. It's currently at 423 records, and just a bit smaller than a 10 meg PDF. I don't really want to split it, and it loads fine and browses and searches fine. But I'm wondering if I'm not near the limit on size, and

  • Captivate 5 English-to-Foreign-Language Font Errors

    I am working with a large client who has experienced translation errors in Captivate 4 transfers to Captivate 5. The font they've used didn't translate into Chinese, and when the course was updating to Cap 5, everything basically broke. My inquiry is

  • ERROR: cannot grab an automatic activity

    Hi, I am trying to showcase the GRAB activity. I am able to grab from a timer wait and interactive. I wanted to depict the GRAB from an automatic activity. To simlate a 'long running' automatic activity, i put a thread.sleep() (wait) in it. Can anyon

  • Parameter Questions 9i

    I need to attain the following information: Identify the database name, instance name, and size of the database blocks. List the name, location and size of the data files, online redo log files, and the name/location of the control files. List the cu