Help.....problem with obtaining files from a directory

Anaybody knows how to obtain list of files from a directory from j2me
as in j2se ?

I don't think it's possible because a MIDlet lives isolated from the rest of the device's filesystem. It can only store persistent data on the Record Media Store, which is unique for each MIDlet.

Similar Messages

  • How can I create a array with all files from a directory

    How can I create a array of files or varchar with all files from a directory?

    I thought the example could be improved upon. I've posted a solution on my blog that doesn't require writing the directory list to a table. It simply returns it as a nested table of files as a SQL datatype. You can find it here:
    http://maclochlainn.wordpress.com/2008/06/05/how-you-can-read-an-external-directory-list-from-sql/

  • Problem with NEF files from Nikon D4

    Hi everyone. I find a problem with nef files from my Nikon D4. When files are open in ViewNX2 (free viewer software from Nikon) they are perfect, as shooted... but in ACR they are very different... I use LR4 or CS5 with ACR 6.7 and the difference seems to be linked at D-Lighting function. My impression is that ACR dont read this option and picture are very very dark that original shootings. Anyone have this problem?

    This question used to be answered in the FAQ before they revised it.  So, here we go again.  ViewNX is capable of reading all of the in-camera settings such as, camera profile, saturation, sharpness and other settings.  It is capable of doing this because it is Nikon Software, and they have the ability to program it to read the settings from their raw images.  Lightroom does not read those settings from Nikon cameras or any other brand of camera.  Part of the reason is that different camera makers store those settings differently.
    When I first started using Lightroom I adjusted one of my images that represented what I normally shoot until it looked the way I wanted it.  Then I saved those adjustments as my default settings for the camera.  From that point onward, whenever I import images those settings are automatically applied, and it takes care of the vast majority of my images.  Of course, I still have to make individual adjustments.  But my default settings greatly reduce the amount of how they work that I have to do.
    Active D-lighting is is one of those features that Lightroom does not recognize.  You would be well advised not to use it, or else create a preset to simulate its effect.  It will provide no benefit to your Lightroom work.
    This is a fundamental difference with Lightroom, and something that must be understood and implemented if you are going to use the program effectively.
    I realize this question was asked in the ACR forum and I referenced Lightroom throughout.  But the principle is the same, and the recommended procedure is the same.

  • I just stared having problems with importing files from nikon D810 into LR 5.7 it pop a window saying it can not read files on working on a imac 27" running yosemite on my mac pro after a few times it finally was able to read files and import them into LR

    I just stared having problems with importing files from nikon D810 into LR 5.7 it pop a window saying it can not read files on working on a imac 27" running yosemite on my mac pro after a few times it finally was able to read files and import them into LR I never had this problem before was there some kind of update that could of cause this?

  • Problem with reading files from folders - please help

    Hi!
    I have 2 folders (folder1 and folder2) on 2 different locations. Now i will say few things about my program.
    First folder is input folder. Different applications generate XML files and put them inside folder1.
    Then i have my application which i use to manipulate with those folders. Basically, i have 2 threads. One is checking if there are files in folder1 and other thread is moving manipulated files from folder1 to folder2.
    I face this problem. XML files are much faster generated then manipulated. Example: for every 3 incoming files into folder1 i have 1 manipulated and stored file into folder2. This way i face problem that some older files are never manipulated, they are stuck in folder1 basically forever.
    Could someone help me to solve this problem? I do not know how to select files form folder1 ordered by "date modified time".
    Tnx for your time and help!

    Do not crosspost! I'll lock this thread.

  • Problems with loading Classes from a Directory of a jar file.

    Hi Guys,
    i have a problem with my programm. It works greatly in my eclipse platform. but there are all classes in my default folder. I want to add a plugin function now. My Abstract classes are in in my default folder and my doughter classes are in my plugin-folder called plugin.
    I look what is in the pluginfolder -> all my doughter classes. but i every time get a Class Cast Exception and an ClassNotFoundException.
    How can i do that ? Current i do it with Class.forName(frames.substring(0,frames[i].indexOf(".class")));
    best regards flo

    http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html

  • Problem with downloading file from FTP server

    Hello all
    I have uploaded a file from an application i developed and i want to download this file from another application. The code is
    public static void FTPcon() throws FtpException{
       String hostname = "my.ftp.server";
       String username = "myusername";
       String password = "mypass";
       Ftp ftp = new Ftp(hostname,username,password);
       ftp.setHostname(hostname);
            ftp.setUsername(username);
            ftp.setPassword(password);
            ftp.connect();
            ftp.setBinary();
            ftp.download("file.dat");
            ftp.disconnect();
    }The error i receive is java.io.FileNotFoundException: public.dat (The system cannot find the file specified) but the file is on the server.
    Thanks in advance for any help

    Cotton thank you for your reply
    Any other sugestions please?The server disagrees. So...
    - the file does not existThe file exists.I checked it with an FTP client program.
    - the file has a different nameThe file name is correct
    - you are connected to the wrong serverI am connecting to the correct server
    - you are in the wrong ftp directoryThe file is placed in the home directory
    - the ftp library you are using is broken (less
    likely)I am using the library from jscape.I dont think is broken because i can upload the file from the first application.
    >
    FTP isn't somehow broken in Java. I use it all the
    time. The problem is something listed above. I would
    check all of the first four if I were you because
    that's most likely where the problem is.Message was edited by:
    flightcaptain

  • Reoccuring HANGING problem with transferring files from old MACBOOK

    ok, so I recently bought a iMac and i wanted to transfer my music and photo files from my older (waterdamaged a while back but still works fine) macbook. I've tried basically every method to try and get this done.
    I've tried migration assistant, transferring the files through a shared wireless network, through firewire/disk target mode, but all of those methods i tried resulted in hanging very early on in the transferring and copying operation.
    I believe it must have something to do with my macbook's hard drive, but i have no idea what to do at this point. Could someone please help me?

    the thing is tho, the hard drive had no problems copying and transferring for over a year after the damage, while i continued to use it. I don't a reason why it wouldn't work now when i finally want to move a larger number of files at once (itunes music folder, iphoto library)

  • Problems with indexing files from my hard disk

    Hi everybody,
    I'm a newbie to oracle and i'm trying to index files from my hard disk with oracle text. After i created a simple text file (path: 'c:\tmp\test.txt') and filled it with a short text, i executed the following lines without an error message:
    grant connect, resource, ctxapp to myuser;
    create table myuser.testtab(id number primary key, text BFILE);
    create or replace directory test_dir as 'c:\tmp';
    grant read on directory test_dir to myuser;
    insert into myuser.testtab (id, text) values (1, BFILENAME('test_dir','test.txt'));
    create index myuser.idx_test on myuser.testtab(text) indextype is ctxsys.context;
    the record in the table testtab is stored, but the index table is empty. After i tried to get information about the bfile with java i got an SQLException with the Error-Code ORA-22285 after executing the following lines:
    BFILE file = null;
    try{
    rset = stmt.executeQuery("select text from testtab where id = 1");
    if (rset.next()) {
    file = ((OracleResultSet) rset).getBFILE(1);
    System.out.println("Result from fileExists: " + file.fileExists()); //This is the line where the exception is thrown
    } catch (Exception e){
    e.printStackTrace();
    I would be obliged for any information to this problem.
    Thanks in advance,
    Chris J.
    PS: i'm using Oracle 11.2g on Windows 7

    I got your problem. Drop all the directory,table and index. Log in as "myuser" and do all the things. See the demo below. Don't use myuser.object name When executing the commands from "myuser".
    SQL> conn sys@xe as sysdba
    Enter password: ******
    Connected.
    SQL> create table hr.testtab(id number primary key, text BFILE);
    Table created.
    SQL> create or replace directory test_dir as 'c:\';
    Directory created.
    SQL> grant read on directory test_dir to hr;
    Grant succeeded.
    SQL> insert into hr.testtab (id, text) values (1, BFILENAME('test_dir','test.txt'));
    1 row created.
    SQL> ed
    Wrote file afiedt.buf
      1* create index hr.idx_test on hr.testtab(text) indextype is ctxsys.cont
    SQL> /
    Index created.
    SQL> select * from ctxsys.CTX_INDEX_ERRORS;
    ERR_INDEX_OWNER                ERR_INDEX_NAME                 ERR_TIMES
    ERR_TEXTKEY
    ERR_TEXT
    HR                             IDX_TEST                       31-AUG-10
    AAAEjaAABAAAKsKAAA
    DRG-50857: oracle error in drstldef
    ORA-22285: non-existent directory or file for FILEEXISTS operation
    SQL> conn hr@xe
    Enter password: **
    Connected.
    SQL> select * from CTX_USER_INDEX_ERRORS;
    ERR_INDEX_NAME                 ERR_TIMES ERR_TEXTKEY
    ERR_TEXT
    IDX_TEST                       31-AUG-10 AAAEjaAABAAAKsKAAA
    DRG-50857: oracle error in drstldef
    ORA-22285: non-existent directory or file for FILEEXISTS operation
    SQL> conn sys@xe as sysdba
    Enter password: ******
    Connected.
    SQL> drop directory test_dir;
    Directory dropped.
    SQL> conn hr@xe
    Enter password: **
    Connected.
    SQL> create or replace directory test_dir as 'c:\';
    Directory created.
    SQL> drop table testtab;
    Table dropped.
    SQL> create table testtab(id number primary key, text BFILE);
    Table created.
    SQL> set serverout on
    SQL> DECLARE
      2   v_file BFILE := BFILENAME ('TEST_DIR', 'test.txt');
      3   BEGIN
      4   IF DBMS_LOB.FILEEXISTS (v_file) = 1 THEN
      5  DBMS_OUTPUT.PUT_LINE ('File exists.');
      6   ELSIF DBMS_LOB.FILEEXISTS (v_file) = 0 THEN
      7  DBMS_OUTPUT.PUT_LINE ('File does not exist');
      8  ELSE
      9   DBMS_OUTPUT.PUT_LINE ('Unable to test existence');
    10   END IF;
    11   END;
    12  /
    File exists.
    SQL> insert into testtab values (1,BFILENAME ('TEST_DIR', 'test.txt'));
    1 row created.
    SQL> create index idx_test on testtab(text) indextype is ctxsys.context;
    Index created.
    SQL> select * from CTX_USER_INDEX_ERRORS;
    no rows selected

  • Problems with downloading file from database!

    I have a table with my files:
    NAME     VARCHAR2(256)
    LAST_UPDATED     DATE
    MIME_TYPE      VARCHAR2(128)
    DOC_SIZE     NUMBER
    DAD_CHARSET     VARCHAR2(128)
    CONTENT_TYPE     VARCHAR2(128)
    CONTENT     LONG RAW
    BLOB_CONTENT      BLOB
    ID     NUMBER
    I have a procedure which download file for it's ID:
    procedure DownloadFile(id number)
    is
    v_mime VARCHAR2 (48);
    v_length NUMBER;
    v_file_name VARCHAR2 (2000);
    lob_loc BLOB;
    i integer;
    BEGIN
    i:=id;
    SELECT d.mime_type, d.blob_content, d.NAME, DBMS_LOB.getlength(d.blob_content)
    INTO v_mime, lob_loc, v_file_name, v_length
    FROM documents d, mydocs m
    WHERE d.id=m.doc_id
    and m.id=i;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    OWA_UTIL.mime_header (NVL (v_mime, 'application/octet'), FALSE);
    -- set the size so the browser knows how much to download
    HTP.p ('Content-length: ' || v_length);
    -- the filename will be used by the browser if the users does a save as
    HTP.p ( 'Content-Disposition: attachment; filename="'
    || REPLACE (REPLACE (SUBSTR (v_file_name,
    INSTR (v_file_name, '/') + 1
    CHR (10),
    NULL
    CHR (13),
    NULL
    || '"'
    -- close the headers
    OWA_UTIL.http_header_close;
    -- download the BLOB
    WPG_DOCLOAD.download_file(lob_loc);
    end;
    And when I press Download button, it open the file content in browser.
    But I need save dialog, for saving the file in the clien machine.
    How to solve this problem?
    Regards,
    Kostya!
    Message was edited by:
    Kostya

    How downloaded objects/document are treated in browser is purely "browser defined behavior". Sometime someone said that or these kind of files (recognized by miome contenet - alias file extension) default behavior will be "show inline" or show in browser. This is esspecially true for Adobe 7.x and IE 6.x and Firefox 2.x....
    For a test of my thoughts, install new browser (let say Opera or Mozila) and try to download LOB(doc). I'm sure that "Save As" dialog will show!
    Hope this helps!

  • Problems with moving files to ora directory UTL_FILE.PUT_RAW - ORA-29285

    hi,
    i'm using apex 4.1
    i have a procedure which moves my file from apex_application_files to ORA directory.
    if i choose a text file or small word document which is 1kb, it works. but if i have pdf file (85kb) or word document (16kb) it gives me ORA-29285: file write error
    what's my problem?
    PROCEDURE put_file_to_server (p_filename IN VARCHAR2,p_cert_type IN VARCHAR2,p_cert_pk IN NUMBER)
    AS
    l_file UTL_FILE.file_type;
    l_blob_len INTEGER;
    l_pos INTEGER := 1;
    l_amount BINARY_INTEGER := 32767;
    l_buffer RAW (32767);
    v_new_filename VARCHAR2(100);
    v_bfile BFILE ;
    BEGIN
    -- delete from apex_application_files;
    --Neuen Dateinamen generieren
    v_new_filename := p_cert_type||'_'||p_cert_pk;
    v_bfile := BFILENAME (v_directory, v_new_filename);
    --Datei erstellen
    l_file := UTL_FILE.fopen(v_directory,v_new_filename,'w');
    IF DBMS_LOB.FILEEXISTS (v_bfile) = 1 THEN
    cert_log_pkg.m(p_module => 'CERT_FILE_PKG.PUT_FILE_TO_SERVER',p_msg => 'File exists');
    FOR rec IN (select blob_content lblob from apex_application_files where rownum = 1)
    LOOP
    l_blob_len := DBMS_LOB.getlength(rec.lblob);
    cert_log_pkg.m(p_module => 'CERT_FILE_PKG.PUT_FILE_TO_SERVER',p_msg => 'Filesize is '||l_blob_len);
    WHILE l_pos < l_blob_len LOOP
    DBMS_LOB.read (rec.lblob, l_amount, l_pos, l_buffer);
    UTL_FILE.put_raw (l_file, l_buffer, FALSE);
    l_pos := l_pos + l_amount;
    END LOOP;
    COMMIT;
    END LOOP;
    --Datei schließen
    UTL_FILE.fclose(l_file);
    else
    cert_log_pkg.m(p_module => 'CERT_FILE_PKG.PUT_FILE_TO_SERVER',p_msg => 'Datei doesn't exist');
    end if;
    EXCEPTION
    WHEN OTHERS
    THEN
    -- Close the file if something goes wrong.
    IF UTL_FILE.is_open (l_file) THEN
    UTL_FILE.fclose (l_file);
    END IF;
    delete from apex_application_files;
    RAISE;
    delete from apex_application_files;
    END put_file_to_server;

    Sorry but din't test this...Can you give it a try and see if this works?
    PROCEDURE put_file_to_server(
        p_filename  IN VARCHAR2,
        p_cert_type IN VARCHAR2,
        p_cert_pk   IN NUMBER)
    AS
      l_file UTL_FILE.file_type;
      l_blob_len INTEGER;
      l_pos      INTEGER      := 1;
      l_amount BINARY_INTEGER := 32767;
      l_buffer RAW (32767);
      v_new_filename VARCHAR2(100);
      v_bfile BFILE ;
      vblob BLOB;
      vstart NUMBER := 1;
      my_vr RAW(32000);
      bytelen NUMBER := 32000;
      LEN     NUMBER;
    BEGIN
      -- delete from apex_application_files;
      --Neuen Dateinamen generieren
      v_new_filename := p_cert_type||'_'||p_cert_pk;
      v_bfile        := BFILENAME (v_directory, v_new_filename);
      --Datei erstellen
      --l_file                          := UTL_FILE.fopen(v_directory,v_new_filename,'w');
      l_file                          := UTL_FILE.fopen(v_directory,v_new_filename, 'WB', 32760);
      IF DBMS_LOB.FILEEXISTS (v_bfile) = 1 THEN
        cert_log_pkg.m(p_module => 'CERT_FILE_PKG.PUT_FILE_TO_SERVER',p_msg => 'File exists');
        FOR rec IN
        (SELECT blob_content lblob,
          LENGTH(blob_content) LEN
        FROM apex_application_files
        WHERE rownum = 1
        LOOP
          cert_log_pkg.m(p_module => 'CERT_FILE_PKG.PUT_FILE_TO_SERVER',p_msg => 'Filesize is '|| LEN);
          IF LEN < 32760 THEN
            utl_file.put_raw(l_file,lblob);
            utl_file.fflush(l_file);
          ELSE -- write in pieces
            vstart      := 1;
            WHILE vstart < LEN
            LOOP
              dbms_lob.read(vblob,bytelen,vstart,my_vr);
              utl_file.put_raw(l_file,my_vr);
              utl_file.fflush(l_file);
              -- set the start position for the next cut
              vstart := vstart + bytelen;
              -- set the end position if less than 32000 bytes
              x         := x - bytelen;
              IF x       < 32000 THEN
                bytelen := x;
              END IF;
            END LOOP;
          END IF;
         END LOOP;
        ELSE
          cert_log_pkg.m(p_module => 'CERT_FILE_PKG.PUT_FILE_TO_SERVER',p_msg => 'Datei doesnt exist');
        END IF;
        utl_file.fclose(l_file);
      EXCEPTION
      WHEN OTHERS THEN
        -- Close the file if something goes wrong.
        IF UTL_FILE.is_open (l_file) THEN
          UTL_FILE.fclose (l_file);
        END IF;
        DELETE FROM apex_application_files;
        RAISE;
        DELETE FROM apex_application_files;
      END put_file_to_server;Edited by: Vitor Rodrigues on 17/Fev/2012 12:03

  • Problems with RAW files from Nikon D4

    At the moment I'm using LR 4.1 rc and PS CS 6 beta. I tried to send a D4 raw file from LR to PS, but PS didn't open it.
    The next thing I tried was to open D4 raws directly with PS CS 6, no success either.
    The raw files from my D200 aren't any problem.
    So is there knowledge wether PS CS 6 is supporting Nikon D4 RAWs or not? If it should be supported, what could be my problem?
    Thx in advance
    Dominik

    See this link for full details on camera support in Camera Raw versions:
    http://blogs.adobe.com/lightroomjournal/2012/03/raw-support-in-lightroom-and-camera-raw.ht ml
    Snip taken from link above:
    You’ll also note that ACR7, available with Photoshop CS6 beta, is lagging the most in updated camera support.  This is based on when we lock down or “bake” the code for each release.   Even though ACR7 was only released last week it was “baked” before Lightroom 4.0 and Camera Raw 6.7.  Similarly, Lightroom 4.0 was finalized before Camera Raw 6.7.  We’ll get Lightroom and Camera Raw in sync soon but in the interim, here’s the latest incremental support list for each product, relative to Camera Raw 6.6 and Lightroom 3.6:
    Photoshop CS6 beta with ACR7
    Canon PowerShot S100V
    Fuji FinePix X-S1
    NOTE:
    ACR7.1 will have the superset of all currently supported cameras in ACR6.7 and LR4.1 plus a few extras.

  • Problems with WSDL file from Webservice definition

    Hi all,
    I trying to import into XI the WSDL file from a web service. I´m doing it following the blog /people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi
    But I do not why but it is not creating the messages.
    Any Idea,
    Many thanks and Regards
    Noelia

    Hi thnaks for your help!!
    this is the wsdl file. I think this is correct,but i´m not very familiar with this!
    <?xml version="1.0" encoding="utf-8"?>
    <!--            Generated by WSDLDefinitionsParser    --><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns0="urn:WS_ExtraccionNombramientoVi" targetNamespace="urn:WS_ExtraccionNombramientoWsd/WS_ExtraccionNombramientoVi/document" xmlns:tns="urn:WS_ExtraccionNombramientoWsd/WS_ExtraccionNombramientoVi/document">
      <wsdl:types>
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:WS_ExtraccionNombramientoVi" xmlns:tns="urn:WS_ExtraccionNombramientoVi" elementFormDefault="qualified">
          <xs:element name="ejecutarExtraccionNS">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="fechaExplotacion" type="xs:string" nillable="true"/>
                <xs:element name="tipoXML" type="xs:string" nillable="true"/>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
          <xs:element name="ejecutarExtraccionNSResponse">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="Response" type="xs:string" nillable="true"/>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:schema>
      </wsdl:types>
      <wsdl:message name="ejecutarExtraccionNSIn_doc">
        <wsdl:part name="parameters" element="ns0:ejecutarExtraccionNS"/>
      </wsdl:message>
      <wsdl:message name="ejecutarExtraccionNSOut_doc">
        <wsdl:part name="parameters" element="ns0:ejecutarExtraccionNSResponse"/>
      </wsdl:message>
      <wsdl:portType name="WS_ExtraccionNombramientoVi_Document">
        <wsdl:operation name="ejecutarExtraccionNS">
          <wsdl:input message="tns:ejecutarExtraccionNSIn_doc"/>
          <wsdl:output message="tns:ejecutarExtraccionNSOut_doc"/>
        </wsdl:operation>
      </wsdl:portType>
    </wsdl:definitions>
    Regards Noelia

  • Problem with JPEG files from Leica M and GPS data

    It seems there's a serious bug in Camera Raw 8, hosted in Bridge CS6 on an MS Windows machine, with regard to GPS metadata.
    When using a Leica M (Typ 240) with a multi-function handgrip then both the DNG files (DNG is Leica's native raw format) and the JPEG files out of the camera will include GPS position data in the respective EXIF metadata sections. However, Bridge refuses to display the JPEG files' GPS data (while there's no problem with the GPS data in the DNG files). Worse yet—when loading a JPEG file in Camera Raw for some parametric adjustments and saving the file then the GPS data will be entirely gone! (Again, no problems with the DNG files' GPS data.)
    I suppose that Camera Raw 8 hosted in Bridge CC as well as Lightroom 5 are suffering from the same issue.

    Nobody? Absolutely nobody?? Zalman? Eric? Anyone?
    If you need more input from me then please talk to me.

  • Problems with downloading files from the internet?

    I have Mozilla Firefox and Safari on my macbook. For some reason it will not let me download things from the internet. Whenever i keep a download link, the page never loads....can anyone put some insight into my problem?
    Justin Evans

    Since a few hours, I have the same problem like you. I uninstalled Firefox, because I thought it was a problem with it, but then i started Safari to redownload Firefox and guess what happened.. nothing. I can't download anything. don't know why. does anyone know whats wrong??

Maybe you are looking for

  • Update help

    IWhen I try to update my iPad on my PC I keep getting a message saying the device connected to the USB is not working.  There is an error 6011 I think.  I have updated my iPhone, but iPads wont work.  Any ideas.I keep getting a message and the iPad h

  • Mavericks on mid 2010 MAC Pro really slow.  Can I do anything to speed it up?

    Mavericks OS X 10.9.2 on mid 2010 MAC Pro really slow.  Can I do anything to speed it up?

  • Create Vendor Master Data

    hi I know that there is a bapi BAPI_VENDOR_CREATE but as far as I know this always pops up an input screen. Is there a bapi to create a vendor master data with input from outside without that screen?? Thanks Go:khan

  • Get excess quantity from purchase order quantity

    Hi All, if i make a purchase order with item x  100 quantity and time of making GRPO i have got 105 then my user want a approval that he got 105 item  so how i can do this.....???? plz help me to solve out this problem.... can i use this on a particu

  • First page prints higher than others

    I'm modifying a check RTF template for EBIS R12 that was given to me and I've been able to get everything working except for one thing - the first page of output prints one line higher than all the rest. Has anyone ever experienced this before? I'm q