Putting a file with Stream into database

Hi,
I'm trying to put a file into my JE database, but I was only find one methody to put this this, the methody is with byte[], but when I need put a big file into database I have problems with the memory of the server. Exists annother methody like an stream to do it?
Message was edited by:
Hugo Haas

Hugo,
No, we don't have a stream IO api, and although it is possible to do so with the byte[] api, as you are trying to do, you can run into memory issues you've seen because the file is treated as a data record in the cache. I believe that some users take the approach of using JE to store information about the file, instead of the file itself. Perhaps that could work for you.
This request does come up every now and then. As always, knowing more about use cases and requirements helps us add features. For example, we'd like to know:
- what's the business use case?
- technical requirements, such as what kind of transactional semantics are desired?
- or lower level characteristics, such as what's the access pattern for the data? Are records likely to be updated or deleted? Would you want to put a secondary index based on a portion of the file?
We'd welcome comments from you or any other readers.
Regards,
Linda

Similar Messages

  • How to put two files with the same name into the same folder?

    How can I put two files with the same name and the same extention into the same directory?
    Is this even possible?
    Thanks in advance. 

    Are you sure? I would be very surprised if that was the case.
    How does the computer/filing system differentiate the files, if not by their names?
    How do you tell the computer which one you want? (On the command line.)

  • Pool data from text file and insert into database

    Can anyone tell me how to pool data from a text file and insert into database?
    let's say my text file is in this format
    123456 Peter 22
    234567 Nicholas 24
    345678 Jane 20
    Then I need to insert the all the value for this three column into a table which has the three column name ID, Name, Age
    Anyone knows? I need to do this urgently...Thank in advanced

    1. Use BufferedReader and read the file line by line.
    2. Loop thru the file and do the following steps with in this loop.
    3. Use StringTokenizer to seperate each line into three values (columns).
    4. Now create a insert statement with these values and add the statement to the batch (using addBatch() method of PreparedStatement or Statement).
    5. Finally (after exiting the loop), execute these batch of statements (using ps.executeBatch()).
    Sudha

  • Live view putting a file with no name

    So i have a problem (don't know if it's a problem really, but at least an annoyance) with the Live View and Preview in browser features.
    When use them, the file transfer window pops up (even if i have told it to stay "hidden") showing the following:
    Started: 29.5.2013 15.47
    index.php - same - not transferred
    Connections:Raspberrypi.php - same - not transferred
    styles:common.css - same - not transferred
    - error occurred - Access denied.  The file may not exist locally,  may be open in another program, or there could be a local permission problem.
    File activity incomplete. 1 file(s) or folder(s) were not completed.
    Files skipped: 3
    Files with errors: 1
    Finished: 29.5.2013 15.47
    So the weird lines are those marked with red. It looks like its trying to put a file with no name or extensions at all - and i don't think i have such files on my site. Also the permissions are correct on both the server and my Mac.
    My web browser opens up and shows the site perfectly, and if I'm using the Live View, the site shows up well too. The thing is every time I hit F5 to refresh, i have to close the file transfer window. Annoying.
    I don't know if it matters but I'm using a Raspberry Pi as my home web server. It has Apache2, PHP 5, MySQL and vsftpd running, and I have been able to use them with no problem earlier.
    Hopefully someone knows what I am doing wrong here...
    Thanks in adnvance!

    Have you enabled Automatic Upload on SAVE?  I never FTP files on Save.  Way too much risk of error and it takes focus away from my work which is very distracting.  See screenshot.
    Nancy O.

  • I have put several clips with transitions into the timeline in final cut pro. There are two clips which are followed by transitions which do not play at the right speed. It is extremely frustrating, can anyone help?

    I have put several clips with transitions into the timeline in final cut pro X. There are two separate clips which are followed by transitions which do not play at the right speed. I'm at a loss as to why this is happening - any thoughts/help?

    The two HD clips were purchased from itunes (MPEG - 4) and converted to .mov for use in Final Cut Pro. Project properties - 720p HD 1280x720 (60p)
    Is this enough information?

  • I'm trying to put movies onto my hard  drive but i can't put the files with the same name onto the hard drive , finder won't let me change the name

    I'm trying to put movies onto my hard  drive but i can't put the files with the same name onto the hard drive , finder won't let me change the name. What am i doing wrong?

    Make a new folder and put them in that different folder. Then the names can be the same as others already on your drive.

  • How can I make an easy *.CSV file to load into database table

    Hi All,
    I have a huge excel sheet having columns item#, description and qty. The description column sometimes maybe one word name, two word name separated with space or may be , spearated name. I want to write and PL/SQl code which will read this file and load it into database table. Now the *.CSV file is either comma delimited or tab text delmited which both do not solve my issue. Is there any better solution with anyone which can prevent the manual editing to the *.CSV file and I can easily load it to table.
    Your help is appreciated,
    Thanks
    Zahir

    SQL*Loader is probably the fastest method, but since you specifically asked for a PL/SQL method:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:464420312302

  • How do I import a pdf file with layers into Motion 5?

    In earlier version of Motion, you could import a pdf file with all layers or even select layers you wanted to import. You did this by dragging the pdf file into the project and holding it until a popup appeard providing you choices for how you wanted to complete the import. In Motion 5.0.1 however, no such popup appears and it imports the file as a flat image file. Any ideas how to change this pelase?
    Thanks
    Greg

    Thanks Ben & Praveen. In FCP7 It was possible to import PDF files and as you did the import, make choices regarding layers you wished to import. FCPX appears to import PDFs but only as flattened files. I'll try keeping the file in PSD format and importing as you recommend.

  • Can I store RTF file with image into CLOB?

    I have created a WORD template document with company logo heading and format. I have to replace the 'user name', 'date' etc. data every time before I insert into my database. Therefore I store the template doc as RTF format.
    1. Can I insert this doc (RTF with image) into CLOB or I have to store it in BLOB?
    2. I want to store in CLOB because I sometimes have to change to content of the doc with replace statement. Actually, can I replace a string in BLOB too?

    I understand RTF is a binary format and so needs to be stored as a BLOB.
    The DBMS_LOB paackage contains procedures like INSTR() and WRITE() that may do what you what. Take them for a test drive.
    Cheers, APC

  • How to import Spacial Data with mapviewer into Database?

    I have deployed mapviewer10133wls with oc4j and able to see mapviewer home page but don't know how to get started with mapviewer like what configuration it needed and how to import sapcial data into Database with mapviewer. please help with reply.
    Thanks,
    Suchetana.

    If its the Oracle Spatial option you're after, its not included in XE http://download.oracle.com/docs/cd/B25329_01/doc/license.102/b25456/toc.htm#BABJIJCJ
    For GIS data, I'll be no help at all someone else here may have experience with it. If its something that can fit into RDBMS tables there is probably a way to do it without Spatial, but that's just a guess :(

  • How to read text file with big5 into db

    hi,
    how can i use UTL_FILE package to
    read a text file with big5 characters and insert into db?
    my oracle charset is AL32UTF8.
    thx a lot!

    Thx for yr answer!!!
    I have followed and it works.
    However, I got another problem with HKSCS. When the text file contained HKSCS, the store procedure also treats it as Big5 and when I select it out, the character was not the orginal one.
    Please suggest if you have any ideas.
    Many Thanks!!!

  • How to insert files or images into database using mysql

    i need one example how to store files and retrive from database
    give me examples on storing and retriving foles or images

    http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/htdocs/templates.htm#LOBS

  • Importing a dump file with DBMS_DATAPUMP into a different database

    Can I import a dump file using the DBMS_DATAPUMP procedure from one database to another? I know within the OPEN subprocedure you can specify a database link, but that requires the dump file be located on the server where that database link is pointing to.
    What I want to do is leave the dump file on Server A and import it into Server B....can I do that? Or do I have to physically move the file out to Server B?
    Thanks for your help!

    I've never tried this, but could you do it by importing to synonyms that points to the tables over db link?
    As the job runs in the DB, the file would need to be on the server the DB that performs the job is. SO if you can link it over to another database, then it ought to work.
    Would an nfs mount work? Then you wouldn't have to move the file, but you could still run it from the second DB. One more alternative would be to not do it to a file, but to have from and to be databases, then it should work as datapump has that capability.

  • Saving image file as binary into database + pulling it out + displaying

    Hi guys, this is exactly I have to do, and have no ideal how to do.
    It will be greatly appreciated if you can offer help on this.
    I don't have a problem putting it into and pulling it out fo the database, it is really the jpg-> binary, and binary->display part that I need help on.
    Btw, I am currently using "draw Flatten PixMap.VI" to display a picture in labview, from a jpg file. Can I still use this VI to achieve what I intend to do?

    Have you tried this:
    Saving a binary file to a database with the Database Connectivity Toolset
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • How to load file with 500M into noncontiguous memory and visit them

    My data file consist of  a serial of 2d images. Each image is 174*130*2 butes and the total images in the file is up to 11000, which takes almost 500M bytes. I hope to load them into memory in one turn since I need to visit either image many times in random order during the data processing. When I load them into one big 3d array, the error of "out of memory" happended frequenctly.
    First I tried to use QUEUE to load big chunk of data into noncontiguous memory. Queue structure is a good way to load and unload data into noncontiguous memory. But it dosn't fit here since I may need to visit any of the all the images at anytime. And it is not pratical if I dequeue one image and enqueue it into the opposite end, since the image visited may be not in sequential order.
    Another choice is to put the whole file into multiple small arrays. In my case, I may load the data file into 11000 small 2d arrays and each array holds the data of one image. But I don't know how to visit these 2d array and I didn't get any cues in the posters here.
    Any suggestion?
    PC with 4G physical memory, Labview 7.1 and Win XP.
    Thanks.

    I'll try to get the ball rolling here -- hopefully there's some better ideas than mine out there.
    1. I've never used IMAQ, but I suspect that it offers more efficient methods than stuff I dream up in standard LabVIEW.  Of course, maybe you don't use it either -- just sayin'...
    2. Since you can't make a contiguous 11000-image 3D array, and don't know how to manage 11000 individual 2D arrays, how about a compromise?  Like, say, 11 3D arrays holding 1000 images each?   Then you just need ~50 MB chunks of contiguous memory.
    3.  I'm picturing a partially hardcoded solution in which there are a bunch of cloned "functional globals" which each hold 1000 images of data.  This kind of thing can be done using (A) Reentrant vi's or (B) Template vi's.  You may need to use VI Server to instantiate them at run-time.
    4. Then I'd build an "Action Engine" wrapper around that whole bunch of stuff.  It'd have an input for image #, for example, image # 6789.  From there it would do a quotient & remainder with 1000 to split 6789 into a quotient of 6 and remainder of 789.  Then the wrapper would access function global #6 and address image # 789 from it.
    5. Specific details and trade offs depend a lot on the nature of your data processing.  My assumption was that you'd primarily need random access to images 1 or 2 at a time. 
    I hope to learn some better ideas from other posters...
    -Kevin P.
    P.S.  Maybe I can be one of those "other posters" -- I just had another idea that should be much simpler.  Create a typedef custom control out of a cluster which contains a 2D image array.  Now make an 11000 element array of these clusters.  If I recall correctly, LabVIEW will allocate 11000 pointers.  The clusters that they point to will *not* need to be contiguous one after the other.  Now you can retrieve an image by indexing into the array of 11000 clusters and simply unbundling the 2D image data from the cluster element.

Maybe you are looking for

  • What does it take to have a clean billing/exchange transaction?

    OK, it started with my repeated calls to tech support regarding my flaky HD-DVR (6xxx series). Finally I was told by the tech support to call the billing and ask for a replacement/exchange to the newer model (7xxx). I did that and asked the the CSR r

  • New G/L codes not reflecting in Reports

    Dear all, i have created New G/L codes in FS00 and added to financial statement version that is FSE2 to reflect in the reports.New G/L codes can see in standard report S_ALR_87012301 that is G/L balances report, but not reflecting in Cusotmised repor

  • Texts in SRM

    SRM Gurus, I observed that Supplier text in SRM shopping cart is getting mapped to Material PO text in ECC under item details tab. My question is that if this is supplier text, then what settings I should to to send it to supplier? Then internal note

  • Slow Shut Down Time For Macbook Pro Retina Snow Leapord

    Hello, I was hoping somoene could help me with the following problems. I have brand new Macbook Pro Retina, 15inch, 16G RAM, 500G of SSD, running Mountain Lion, and lots of professional recording software. My macbook frequently shuts down after 30 se

  • Load Report failed - ExportToHttp - Stumped.

    If anyone has any ideas on this subject, please comment under this thread: Re: My ReportDriver class for Crystal Reports for Visual Studio 2010. (Since it was previous marked answerd, I "assumed" people might just skip over it.....hence this new thre