Getting the "last modified" property of a file located on HTTP server

Hello
I'd like to read a file (on http server) according to his "last modified" time. Can anybody tell me how to get the "last modified" property in a J2ME/CLDC application?
Thanks in advance

the file that you want get is in the server?
you can use java.io.File.lastModified() which in J2SE to get a long num.
then you can transform long int to orther class that you need ,and do this in server.
at the end of all you can send this info to J2ME/CLDC app with stream.

Similar Messages

  • How to check the last modified time of a file?

    Does anyone know how to use LabVIEW to check the "last modified time" of a file?
    Thanks.

    This works just fine here (Windows XP, LabVIEW 8.5.1).
    (Actually, if you look closely, it is off by one second. I guess the file properties dialog rounds in a different way )
    Do you have more information? (e.g LabVIEW version, OS, etc.). Can you show us the code that fails?
    Message Edited by altenbach on 06-27-2008 08:48 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    modified.png ‏33 KB

  • Getting the last modified date of the contact in addressbook

    Hi all,
    Is there any way to get the last modified date and created date of the contacts stored in address book . I have gone through the api docs and could nt find any api's to get the modified date of the particular contact .
    Any help would be greatly appreciated ..
    Regards,
    Mohammed Sadiq.

    Hi,
    Is the above feauture available in AddressBook fraamework ?
    Best Regards,
    Mohammed Sadiq

  • To get the color View property from a file

    How can get the color view property value of a framemaker file using framemaker API ?

    Hi Asha,
    Color views do not have object handles; rather, they are modified at the color (FO_Color) object level. That is, each color has a property called FP_ColorViewCtl which defines its behavior in each of the six built-in color views. If you want to modify the makeup of a color view, you should modify the colors themselves with respect to the desired view.
    The FP_SpotColorView property only sets the active view... it doesn't modify the view.
    Search the FDK ref for FP_ColorViewCtl and you find an explanation, under the FO_Color object properties.
    Russ

  • How to get the last modified time for directory?

    Hi,
    I have to accomplish this.
    A folder c:\myfolder can literally contain anything files.. sub directories, fiels in sub directories.
    I have a thread monitoring c:\myfolder, basically people can dump files in any order into that directory and I have to trigger something when there is no activity on c:\myfolder for 10 secs.
    I tried lastModified() with File("c:\myfolder") but that seems to be working only if there is some change on root level of c:\myfolder, for eg if I have a sub folder c:\myfolder\subfolder and I copy some file into c:\myfolder\subfolder, then the lastModified() doesnt seem to be updatiing on the mail folder "c:\myfolder"
    Is there a way I can handle this situation?
    Any suggession is appreciated.
    Thanks in advance.

    I was looking to accomplish this using simple java
    code without any 3rd party involvment.Then you will have to monitor all the directories that people might dump files into. You can't expect Java to automatically deal with things that the operating system doesn't support just because those things happen to be your requirements.

  • I backed up my macbook pro before they intalled a new hard drive but when I reinstalled, my book says it isn't compatible with Maverick and I can't get the last year of pictures or files back.

    I backed up my macbook pro before having a new hard drive installed. They installed Maverick for me, but now My Book says its not compatible and I can't restore my files and pictures from the external hard drive. What can I do?

    Simple if you have a complete backup of your old drive erase the new one and restore from your Time Machine backup. That will put your Mac back to exactly like it was before you had the hard drive changed.
    In all honesty I have no idea why most all the Apple stores upgrade every Mac that comes through to Mavericks.
    To do the erasing and restoring you need to either boot from the original system discs that came with your Mac or if it came with either Lion or Mt Lion use the Online Internet Recovery system. To boot to that at startup hold down the Command + Option/alt + r keys and keep them held down until you see a globe on the screen. Once thje Mac OS X Utilities screen loads use Disk Utility to Repartition the drive as one partiotion to remove all data from it. Then when that is done exot disk Utility and select Restore from Time Machine Backup. Have the TM backup drive connected before you start this process.

  • Storing the last modified date for files in a HashMap

    This method gets a list of all the .java files in the source subdirectory, gets the last modified date for them and stores the file name and last modified date in a HashMap.
    import java.util.HashMap;
    import java.io.FilenameFilter;
    import java.io.File;
    import java.util.ArrayList;
    public class myClass
         public static void main(String[] args)
              HashMap result = getLastModified();
         static FilenameFilter javaFilter = new FilenameFilter()
            public boolean accept(File dir, String name)
                return name.endsWith(".java");
         public HashMap getLastModified()
              HashMap lastModified = new HashMap();
              ArrayList javaFiles = new ArrayList();
              File sourceDir = new File(".\\Source");
              File currentFile;
              long lLastModified;
              //get a list of all the .java files in the source directory
              javaFiles=listFiles(javaFilter);
              //for all .java files get and store the last modified date
              for(int i=0; i<javaFiles.size(); i++)
                   currentFile=(File)javaFiles.get(i);
                   lLastModified=currentFile.lastModified();
                   lastModified.put(currentFile, lLastModified);
              return lastModified;
    }The problems I am getting are:
    >
    The method listFiles(FilenameFilter) is undefined for the type myClass
    and
    >
    The method put(Object, Object) in the type HashMap is not applicable for the arguments (File, long)
    can anyone help? What's the best way to go aobut this?

    Thanks for the replies abenstex I modified it so that javaFiles is now a File[] and made the change you suggested but I still have the second problem, here's the code so far:
    import java.util.HashMap;
    import java.io.FilenameFilter;
    import java.io.File;
    import java.util.ArrayList;
    public class myClass
         public static void main(String[] args)
              HashMap result = getLastModified();
         static FilenameFilter javaFilter = new FilenameFilter()
            public boolean accept(File dir, String name)
                return name.endsWith(".java");
         public HashMap getLastModified()
              HashMap lastModified = new HashMap();
              File[] javaFiles = {};
              File sourceDir = new File(".\\Source");
              File currentFile;
              long lLastModified;
              //get a list of all the .java files in the source directory
              javaFiles=sourceDir.listFiles(javaFilter);
              //for all .java files get and store the last modified date
              for(int i=0; i<javaFiles.length; i++)
                   currentFile=(File)javaFiles;
                   lLastModified=currentFile.lastModified();
                   lastModified.put(currentFile, lLastModified);
              return lastModified;

  • Read to get the last line from a File

    Hi
    I am sending in a clarification , hoping that I get an efficient solution from the group, should somebody have come across this scenario and implemented.
    How to read or get the last line from a text file , which usually have a no of records, without actually reading or looping through all the lines
    I know there is some solution with the RandomAccessFile, but given there can be some encoding issues or so.
    Please let me know if somebody have implemented the same.
    Thanks n advance

    The character encoding could, indeed, be an issue especially with UTF-8. I think what I'd do is to create a byte array with the encoded, expected end of line sequence in it and work on the file in bytes. For example, seek to the last 100 bytes of the file, read those bytes and look for an EOL sequence backwards. If not found read the previous 100, 200, 400 bytes etc. until you do find an end of line. Then seek to after the EOL and read normally. Remember an EOL sequence might cross a boundary.
    UTF-8 would be a problem, especially with a unix format file because you might mistake part of a multi-byte sequence for '\n'. To be reliable on UTF-8 you'd need to go back three characters looking for sequence start markers (has the previous character got the top bit set, or the one before that the first two bits set, or the one before that the top three bits). Or you could just react to an encoding exception and try another position.

  • How to get the last time a record was modified or created ?

    Is there a way (hidden system fields for example, system view, other ?) to get the last time a record of a table was modified or the date it was created.
    Thanks for any help.
    Stiphane CAMPION

    blarman74 wrote:
    I know I could do this with a trigger, but I was wondering if there is a data dictionary view I can query to find the date/time a table was last updated. What I have is a table that is constantly getting hammered with new data being uploaded from a third party. We need to keep close tabs to verify that this datafeed is constantly running and bringing in new data. Because the data that comes in comes from multiple timezones and there are hundreds of lines, our attempts at monitoring by just looking at the data leave something to be desired.
    Any ideas?refer this links
    How to find Last modified/updated time of a particular table
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1590655700346557237
    Thanks

  • How do I get the last changed date & time of a file in app server?

    Hi Experts,
    How do I get the last changed date & time of a file in app server?
    Thanks!
    - Anthony -

    Hi,
    that's what I use...
      CALL 'C_DIR_READ_FINISH'.             " just to be sure
      CALL 'C_DIR_READ_START' ID 'DIR' FIELD p_path.
      IF sy-subrc <> 0.
        EXIT. "Error
      ENDIF.
      DO.
        CLEAR l_srvfil.
        CALL 'C_DIR_READ_NEXT'
          ID 'TYPE'   FIELD l_srvfil-type
          ID 'NAME'   FIELD l_srvfil-file
          ID 'LEN'    FIELD l_srvfil-size
          ID 'OWNER'  FIELD l_srvfil-owner
          ID 'MTIME'  FIELD l_mtime
          ID 'MODE'   FIELD l_srvfil-attri.
    *    l_srvfil-dir = p_path .
        IF sy-subrc = 1.
          EXIT.
        ENDIF." sy-subrc <> 0.
        PERFORM p_to_date_time_tz
          USING    l_mtime
          CHANGING l_srvfil-mod_time
                   l_srvfil-mod_date.
        TRANSLATE l_srvfil-type TO UPPER CASE.               "#EC TRANSLANG
        PERFORM translate_attribute CHANGING l_srvfil-attri.
        CHECK:
          NOT l_srvfil-file = '.',
          l_srvfil-type = 'D' OR
          l_srvfil-type = 'F' .
        APPEND l_srvfil TO lt_srvfil.
      ENDDO.
      CHECK NOT lt_srvfil IS INITIAL.
      pt_srvfil = lt_srvfil.
    FORM p_to_date_time_tz  USING    p_ptime  TYPE p
                            CHANGING p_time   TYPE syuzeit
                                     p_date   TYPE sydatum.
      DATA:
        l_abaptstamp TYPE timestamp,
        l_time       TYPE int4,
        l_opcode     TYPE x VALUE 3,
        l_abstamp    TYPE abstamp.
      l_time = p_ptime.
      CALL 'RstrDateConv'
        ID 'OPCODE' FIELD l_opcode
        ID 'TIMESTAMP' FIELD l_time
        ID 'ABAPSTAMP' FIELD l_abstamp.
      l_abaptstamp = l_abstamp.
      CONVERT TIME STAMP l_abaptstamp TIME ZONE sy-zonlo INTO DATE p_date
          TIME p_time.
    ENDFORM.                    " p_to_date_time_tz
    Regards,
    Clemens

  • I cannot open files attached to an excel spreadsheet. I am using office for mac 2011. when double clicking object I only get the picture modifier windows.

    I cannot open files attached to an excel spreadsheet. I am using office for mac 2011. when double clicking object I only get the picture modifier windows.

    Preventing Microsoft Office to open recent documents at startup in Mac OS, Please see:
    http://www.frenchguys.com/wordpress/preventing-microsoft-office-open-documents-startup-mac-os-lion/
    It seems that the solution works for most people.
    In a terminal, enter the following:
     defaults write com.microsoft.Excel NSQuitAlwaysKeepsWindows -bool false

  • How to get the Last cell in HSSFCell (Excel sheet)

    Hello
    I am trying to convert an excel sheet to a tab limited file.
    I am using HSSF and unable to track how do i know if the cell encountered is a last filled cell in excel sheet
    Some of the cells in the sheet can be blank. In that case i am just using inputting a '\t' for that cell and read the next one. But coz of this when i get the last cell, a tab is included for that too.
    Can someone let me know how can i rectify this?
    it seems like HSSFCell does not have any methos like lastCell or so
    Thanx

    then use getLastCellNum() in org.apache.poi.hssf.usermodel.HSSFRow

  • How to get the last series of an invoice- DebitMemo

    Hi,
    I need help to know how I can get the last series number of an Invoice with documentsubType = bod_DebitMemo. I can get the las series number of Invoices with the following code:
    private int getSeries(string documento)
                SAPbobsCOM.CompanyService oCompServ;
                SAPbobsCOM.SeriesService oSeriersService;
                SeriesCollection oSeriesCollection;
                Series oSeries;
                DocumentTypeParams oDocumentTypeParamas;
                int elAnterior = 0;
                try
                    //Get company service
                    oCompServ = vCmp.GetCompanyService();
                    //Get series service
                    oSeriersService = (SAPbobsCOM.SeriesService)oCompServ.GetBusinessService(ServiceTypes.SeriesService);
                    //Get series collection
                    oSeriesCollection = (SAPbobsCOM.SeriesCollection)oSeriersService.GetDataInterface(SeriesServiceDataInterfaces.ssdiSeriesCollection);
                    //Get document type params
                    oDocumentTypeParamas = (SAPbobsCOM.DocumentTypeParams)oSeriersService.GetDataInterface(SeriesServiceDataInterfaces.ssdiDocumentTypeParams);
                    //Set document type
                    oDocumentTypeParamas.Document = documento;
                    /*if (documento.Equals("13"))
                        oDocumentTypeParamas.DocumentSubType = "bod_DebitMemo";
                    //Get series collection
                    oSeriesCollection = oSeriersService.GetDocumentSeries(oDocumentTypeParamas);
                    oSeries = oSeriesCollection.Item(0);
                    elAnterior = oSeries.NextNumber;
                catch (Exception e)
                    MessageBox.Show("Se presento un error: " + e.Message);
                return elAnterior;
    And I try to use the DocumentSubType property of DocumentTypeParamas but it seems to be invalid,
    I'll appreciate if you can help me....
    Thanks.....

    Hi,
         Use describe statment.
    data: lv_line type i.
        Describe table itab lines lv_line.
        read table itab into wa_itab index lv_line.
    regards,
    Santosh Thorat

  • How can you find the Last Modified Date of a particular table

    Hi,
    I want to show to the LAST MODIFIED date of a particular table to the user before refreshing the table with new data. Experts please suggest me the way using JDBC-SQL connection.

    There is no generic SQL way for this. It depends completely on the features your DBMS offers. With Oracle you'd need to create column which gets updated in a trigger. I believe MS SQL Server offers a special data type for this, which is updated automatically. I don't know about others.

  • How to find the Last modified date and time of a package

    Hi,
    We need a clarification on how to find the Last modified date and time of a package in Oracle. We used the example below to explain our scenario,
    Lets consider the following example
    Let A, B be two packages.
    Package A calls the package B. So A is dependent on B.
    When A is compiled the TIMESTAMP,LAST_DDL_TIME in USER_OBJECTS gets updated.
    Now there a modification in package B so it is compiled. There is no modification in package A.
    Now when the package A is executed the TIMESTAMP,LAST_DDL_TIME in USER_OBJECTS gets updated but we did not make any change in Package A. Now we need to find last modified date and time of the package A . So we can not rely on the TIMESTAMP,LAST_DDL_TIME in USER_OBJECTS . Can u please tell us any other solution to get last modified date and time of the package A .
    Regards,
    Vijayanand.C

    Here is an example:
    SQL> SELECT OBJECT_NAME,CREATED,LAST_DDL_TIME,TIMESTAMP,STATUS FROM USER_OBJECTS
    2 WHERE OBJECT_NAME = ANY('A','B');
    OBJECT_NAM CREATED LAST_DDL_TIME TIMESTAMP STATUS
    A 20-MAY-2004 10:57:32 20-MAY-2004 10:57:32 2004-05-20:10:57:32 VALID
    B 20-MAY-2004 10:58:22 20-MAY-2004 10:59:04 2004-05-20:10:59:04 VALID
    SQL> CREATE OR REPLACE PROCEDURE A AS
    2 BEGIN
    3 NULL;
    4 NULL;
    5 END;
    6 /
    Procedure created.
    SQL> SELECT OBJECT_NAME,CREATED,LAST_DDL_TIME,TIMESTAMP,STATUS FROM USER_OBJECTS
    2 WHERE OBJECT_NAME = ANY('A','B');
    OBJECT_NAM CREATED LAST_DDL_TIME TIMESTAMP STATUS
    A 20-MAY-2004 10:57:32 20-MAY-2004 11:01:28 2004-05-20:11:01:28 VALID
    B 20-MAY-2004 10:58:22 20-MAY-2004 10:59:04 2004-05-20:10:59:04 INVALID
    SQL> EXEC B
    PL/SQL procedure successfully completed.
    SQL> SELECT OBJECT_NAME,CREATED,LAST_DDL_TIME,TIMESTAMP,STATUS FROM USER_OBJECTS
    2 WHERE OBJECT_NAME = ANY('A','B');
    OBJECT_NAM CREATED LAST_DDL_TIME TIMESTAMP STATUS
    A 20-MAY-2004 10:57:32 20-MAY-2004 11:01:28 2004-05-20:11:01:28 VALID
    B 20-MAY-2004 10:58:22 20-MAY-2004 11:01:53 2004-05-20:11:01:53 VALID
    Note that the date under the column 'created' only changes when you really create or replace the procedure.
    Hence you can use the column 'created' of 'user_objects'.

Maybe you are looking for

  • How do I give the program time to write to a JTextArea field

    Hi, I created a swing application which listens for user input with a simple button that starts a whole process of reading database records, looping the records, writing files to a file system etc. What I would like to do, is to present the user of t

  • Lots of DW problems...please help

    I've been wrestling with DW for the Mac for the past few days and I'm about to give up... I'm using MX 2004 7.0.1 and it's constantly crashing when I try to upload my files (spinning wheel), everything I download from my server reencodes simple chara

  • Comedy Central HD not working for me, but SD is?

    I noticed this the other day, i am using a Tivo HD with cablecard, and for some reason channel 690 comedy central HD just says searching for signal. But the SD channel 190 works fine, any else seen this?

  • It's been

    Hey guys! I havent use my curve 8900 for.. More than a year?? Or so.. But recently, kinda missed the keyboard and try to get my hands busy on it. But, after done charging, the phone wont restart. Tried these steps actually<br><br>1 - plug it via usb

  • Drive failed -trying to use other optical drive

    Okay here goes. Drive failed on my MacBook Pro. Want to load and install new OS. I put the OS DVD in my son's iMac > shut it down > restart in Target Mode Have the iMac and MacBook Pro connected by Firewire. Start MacBook while holding down the optio