How can I check every 5 secs a file Length with Threads?

As a matter of fact the subject is the main question.
I need your HELP! PLEASEE!!

import java.io.*;
public class RFile implements Runnable {
     public static void main(String args[]) throws Throwable {
          RFile rf = new RFile(new File(args[0]));
          new Thread(rf).start();
     File file = null;
     public RFile(File f) {
          file = f;
     public void run() {
          try {
               while (true) {
                    System.out.println(file.length());
                    Thread.sleep(5000);
          } catch (Throwable err) {};
}

Similar Messages

  • How can I share (e-mail) NEF files shot with a Nikon d5100 in Lightroom 4.4?

    I am new to shooting RAW NEF and then sharing them in Adobe Photoshop Lightroom 4.4. How do you share (e-mail) NEF files shot with a Nikon
    D5100 that have been downloaded into Adobe Photoshop Lightroom 4.4.? Isn't there someway to convert to JPEG for sharing. I have 50th wedding
    anniversary photos taken and want to share with family and can't. Thank You for any assistance on this problem.

    If you use the inbuilt email option your NEFs would be automatically converted to Jpeg, in accordance with the settings you choose bottom left of the email dialog box (or you can setup your own specific settings).
    Alternatively you could export to Jpeg, then attach the exported files to an email outside Lightroom.
    Or you could upload them to a web hosting site such as Flickr or Picasa, or maybe use Dropbox or similar.
    Bottom line is there are lots of ways of sharing your pictures with your family.

  • How can i check the devices which are connected with my AirPort Express?

    I saw an unknown device in the app 'Who Uses My Wifi?', how can i check it through AirPort Utility and can i remove this device by the app?

    Open AirPort Utility
    Hold down the option key on your Mac while you double click the picture of the AirPort router
    Currently connected wireless ciients will be displayed
    Don't forget about the wireless printer you might have, baby monitor, wireless thermostat and other items that connect using wireless. They will appear on your check.....not just computers or iPhones, etc.
    If you have 3 wireless devices, and you see 4 devices connected, you may have an unwanted guest.
    If you are using good wireless security, like WPA2 Personal, and a good password, it is extremely unlikely that another device will be on your network

  • How can I check if there is a table with the given name ?

    I'm using 8i and 9i.
    Could anybody teach me how to check if there is a table with a certain name in SQLPLUS without using SELECT
    statement ?
    I want to use the following logical procedure.
    if exists "table_to_be_deleted" then drop table "table_to_be_deleted"
    Or, is there any system table that I can check the names of tables like
    count = select "table_to_be_deleted" from "an_oracle_system_table"
    if ( count != 0 ) then drop table "table_to_be_deleted"
    Thanks,
    John

    Just create it, but be aware that DDLs can't be executed directly from Pl/Sql, so you'll have to use dynamic Sql, e.g. :
    SQL> create table test(a number);
    Table created.
    SQL> begin
      2  drop table test;
      3  exception
      4  when others then
      5  null;
      6  end;
    SQL> /
    drop table test;
    ERROR at line 2:
    ORA-06550: line 2, column 1:
    PLS-00103: Encountered the symbol "DROP" when expecting one of the following:
    begin case declare exit for goto if loop mod null pragma
    raise return select update while with <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> <<
    close current delete fetch lock insert open rollback
    savepoint set sql execute commit forall merge pipe
    SQL> ed
    Wrote file afiedt.buf
      1  begin
      2  execute immediate 'drop table test';
      3  exception
      4  when others then
      5  null;
      6* end;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL>Now the table does not exist anymore, but further executions will not generate errors, due to the exception handler :
    SQL> desc test
    ERROR:
    ORA-04043: object test does not exist
    SQL> /
    PL/SQL procedure successfully completed.
    SQL>

  • How can I check my back up files?

    Cannot find how to make a new post ka ask a question... please advise...
    OR... I have a lumina 520. there are a lot of notes saying that I can backup my SMS messages to "the cloud" , which i have done (to the best of my knowledge) . Is there a place where I can go to see the backup ?
    Thank You.
    Moderator's note: We amended the title of this post as we moved it to the most appropriate board.

    That is disappointing.  Is there any possibility of getting support on the Nokia Suite for teh Windows phones, as I find the Nokia Suite MUCH more user friendly, than the invisible "cloud" .
    Moderator's note: We amended the title of this post as we moved it to the most appropriate board.

  • How can I watch an old .mov file made with adobe in 2002? (on PC)

    I can get it to play some video, then it goes blank, and I can hear the audio only.  I think the file might have flash, but my quicktime does not have that option in the advanced settings.  Please help, The file was part of a college project in 2002 and I need to be able to access it ...???
    I already tried VCL

    I’m pretty sure Adobe NEVER intended for someone to copy an XMP file from one photo to another outside of LR as a way to replicate settings.   You can make a preset from a photo, as discussed, or if you don’t want to do that, copy-paste the settings from a representative photo that you initially select to one or more new photos.  You could have a special LR folder that holds standard photos to copy/paste from.  Of course creating a Develop preset from the representative photo is the “normal” way to handle such situations, but maybe you have hundreds of different situations to copy settings from and don’t want to create presets for each one, but I’d argue that you could create a complex folder hierarchy for your presets and still have them findable without that much problem.
    As far as the mystery about why some photos show Reset and some show From Metadata, is the Process Version (down in Camera Calibration) of the photo before reading the settings the same between the two situations?  And in general, are these virgin photos newly imported into LR or have some been modified in LR, already?  Does an XMP file already exist for any of these, where that XMP is being overwritten by your external-to-LR copying?  Or do you have auto-write-XMP enabled and your hand-copied XMP is getting overwritten by LR, automatically, before you have a chance to read in anything?

  • How can i check the file  which is upload from  the server

    when upload the excel file from the server file to the internal table ,how can i check the data whether it accord with  the required condition .
    for example ,i want to upload the file which have the data whose type is pack, and it have three integer and  two decimal ,how can i check in my code.
    thanks,

    Hi Sichen,
    First upload the file, Then do ur validations and delete the records that doesn't satisfy ur requirements.
    Thanks,
    Vinod.

  • How can I check the billing address on file for me at iTunes?

    i received an email stating a change in my billing address. I did not make a change. How can I check the address on file? 

    You can viee the billions my address on your account by logging into the accontunt's nt via the Store > View Account menu option on your computer's iTunes, or via the 'manage your apple id' button on http://appleid.apple.com
    But the email may be a phishing email : Identifying fraudulent "phishing" email
    t

  • How can I open and print PDF files?

    How can I open and print PDF files?

    With the free Reader if they are not print protected. With Acrobat otherwise.

  • How can I check for the existence of an XML file in Illustrator Javascript??

    I'm writing a Javascript to run at startup. I want to check for the existence of XML files and process them, if they are available. How can I check for their existence?

    Your first line just sets a variable to a string value… getFiles() is a method of Folder… so
    var InputXMLDir = Folder( "D:/Brackets/Create_Bracket_Graphics/Input/XML-n-Templates/" );
    Not a PC user so I can't remember if the colon is OK…? As you appear to know the file name why bother with a folder get files anyhow you could just check if the file exists then do some thing…
    alert( File( "D:/Brackets/Create_Bracket_Graphics/Input/XML-n-Templates/brackets_men_web.xml" ).exists );

  • How can I check the version of the rdf file?

    Dear all:
    How can I check the version of the rdf file? such like CEXRECRE.rdf .
    my environment is : oracle 11.5.9
    platform : Linux red hat 4.0
    Regards
    Terry

    Terry,
    Use "adident" or "strings -a" commands -- See (Note: 125922.1 - How To Find Oracle Application File Versions) for details.
    Thanks,
    Hussein

  • How can i check the license file installed on the server CCM 6.1.4

    Hi;
    i have installed the CCM 6.1.4; and now i want to upgrade to 8.5, but i don't remenber witch type license i have uploaded ( normal or Hospitality).
    how can i check the license file installed on this server???
    thanks.

    Hi Matthew,
    I think your idea should work just fine, but you will need to work with;
    [email protected]
    To put together the proper license file due to this change called the "License MAC"
    Customer Impact from New Licensing Procedures
    Cisco Unified Communications Manager on VMware on Cisco UCS B-Series Blade Servers uses a different licensing model than Cisco Unified Communications Manager on an MCS server. The MAC address of the NIC card is no longer used to associate the license to the server.
    Instead, the license gets associated to a license MAC, which is a 12 digit HEX value created by hashing the following parameters that you configure on the server:
    •Time zone
    •NTP server 1 (or "none")
    •NIC speed (or "auto")
    •Hostname
    •IP Address (or "dhcp")
    •IP Mask (or "dhcp")
    •Gateway Address (or "dhcp")
    •Primary DNS (or "dhcp")
    •SMTP server (or "none")
    •Certificate Information (Organization, Unit, Location, State, Country)
    This hash of these fields is called the LICENSE MAC
    Note : Once there is a change in any of the parameters that creates the License MAC, it will
    give you 30 day grace period to generate a new license file for the CM based on new license
    MAC.
    http://www.cisco.com/en/US/docs/voice_ip_comm/cucm/install/8_0_2/install/cmins802.html#wp584709
    Cheers!
    Rob

  • How can I check original file name

    Hi all
    How can I check the original file name of a slide while in Keynote.
    Mike Hooley

    Hi Sara,
    Thankyou for your reply. What I meant was , how do you tell the original format , for example microsoft word, excel , powerpoint , jpeg, tiff , that the file was before it was converted to a PDF.
    So for example, i get a pdf file from someone and i want to know was it an exel file or a word file of  a Jpeg or scanned doc before they converted it to a pdf.
    It appears to me this information is not availabel in the file properties unless i am missing something.
    Regards
    Steven

  • How can I check the open-mode of an opened file from the file refNum?

    How can I check the open-mode of an opened file from the file refNum?
    Especially whether a file is opened as read-only or write-only? I haven't found any VI in the panel with file VIs.
    Thanks for any hints!

    Check this post. Probably you can use a kernel.dll call.
    http://forums.ni.com/t5/LabVIEW/file-date-created/m-p/109836

  • How can i check in an eventreceiver of a document library if a file i getting renamed

    Hi,
    i have a document library with an eventreceiver. I am using the events itemadded, itemupaded and itemfilemoved. When i rename a file the event itemfilemoved is called. But how can i check now if this call is from a rename action?
    I saw that there is properties.ListItem.Name but there is no properties.BeforeProperties.ListItem.Name or properties.AfterProperties.ListItem.Name.
    Has someone an idea?
    Best Regards
    Bog
    Developers Field Notes | www.bog1.de

    Hi,
    Use the ItemFileMoving(SPItemEventProperties) event.
    This will get fired before moving the document. So the
    properties.ListItem.Name will be old name and for new name use 
    string fileName = properties.AfterUrl;
    //split it when it gets to /
    string[] nFileName = url.Split('/')
    //return only the file name
    fileName = nFileName[1];
    I hope this will help you. 
    Dont forget to mark as answer if it helps.
    Regards
    Nikhil Ahuja

Maybe you are looking for

  • Help with merging files and calling SOAP adapter in BPM

    Hello All, I have a scenario, where am merging a header file and item file and calling a webservice in ECC. The requirement is that the no. of calls to the webservice depends on the no. of lines in the header file. Mapping is developed according to t

  • How to retrieve email and contacts data from time machine from a different computer

    My iMac hard disc has died and though I have everything backed up on Time Machine I am finding it difficult to access my Contacts (not on iCloud) and emails from my laptop.  I understand that they are to be found on the Time Machine backup in library

  • Extended Receiver & Extended  Interface Determination

    Hi Experts, Can any tell me what is Extended Receiver & Extended  Interface Determination. And the Difference between Standard Receiver & Standard Interface Determination. were to use Extended Receiver & Extended  Interface Determination. Thanks in a

  • Two Websites / One MobileMe?

    Is this a feature or an oversight? I have a MobileMe account, my first website made without iWeb is on the 'homepage.mac.com' domain (corresponding to the iDisk 'Sites' directory) However, when creating a new web design in iWeb it gets published to t

  • USER_EXIT-MV45AFZB FORM USEREXIT_CHECK_VBAP

    HI ALL...I HAVE ONE OBJECT THAT IS IWANTO ADD 3 FIELDS FROM ADRC(POST_CODE1,REGION,COUNTRY) TO VBAP(ZZSHIPTOPC,ZZSHIPTOREG,ZZSHIPTOCO). FOLLOWING THIS LOGIC....      1.ON USER EXIT CHECK INTERNAL TABLE XVBPA FOR THE PARTNER FUNCTIONS AT THE HEADER OR