Download path conversion from / to _ help please
Using JDeveloper 11.1.1.4I have a grain of download that retrieves a path and the name of a field in a table to use to download the particular file. I have the path string and name of the file in a string goes as:
/USR2/upload/SomeFileName.PDF
/USR2/spool/reports/anotherfile.PDF
I need to have the path into the name to get the files from various places. However when the following code is executed, it becomes automatically the / characters into underscores. How to make this work? I tried to replace the / with single and double- and all it does is to put single or double underscore traits.
public void downloadReport(FacesContext ctx,
OutputStream out) throws IOException {
DCBindingContainer bindings =
(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding dcItteratorBindings =
bindings.findIteratorBinding("BatchDetailVO3Iterator");
ViewObject voTableData = dcItteratorBindings.getViewObject();
Row rowSelected = voTableData.getCurrentRow();
String filename = (String)rowSelected.getAttribute("ReportFileName");
System.out.println(filename);
File f = new File(filename);
FileInputStream fis;
byte[] b;
try {
fis = new FileInputStream(f);
int n;
while ((n = fis.available()) > 0) {
b = new byte[n];
int result = fis.read(b);
out.write(b, 0, b.length);
if (result == -1)
break;
}
} catch (IOException e) {
e.printStackTrace();
}
out.flush();
AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
adfFacesContext.addPartialTarget(getDetailReportsTable());
}
Thank youTroy
Try to understand the works of the sample. I use the fileDownloadListener, set up the content type and the file name. This you should do it too. Next step, it's the listener to download (the method you posted). I read data from a BLOB. The essential is that I create a stream of the BLOB one copy for the output stream of the listener.
Here, you will have to modify the code and generate the stream of the file.
The rest of the code can stand as is.
Timo
Tags: Java
Similar Questions
-
Accidentally, I saved a PDF file in the cloud and can't be deleted from there. Help, please. I've upgraded to Adobe Acrobat Reader DC and it does not allow me to save the scans on my computer.
Or simply open CD player
Go to the Home tab then Document Cloud
Click on the PDF file to be removed
Click on remove in the top
-
Attempt to download first CC on a second computer for my only primary repair. Computer a CS6, I removed it. Now Creative Cloud thinks he is already downloaded and it is not. Help, please. < deleted by the moderator >
You will need to provide more information, if it does not fit your situation.
CC desktop applications 'updated' lists when it is not installed
----------------------------------------------------------------http://helpx.Adobe.com/creative-cloud/KB/AAM-lists-removed-apps-date.html
-
Lightroom do not read and download photos from my camera - help please?
I have Lightroom and have used successfully for about 9 months with my Nikon D800
I recently bought a Nikon D500 as a return to the top of body.
When you try to download my first photos on the D500, Lightroom would not read them. I searched and found an update of the software. After update, Lightroom read and downloaded pictures of the D500.
Now, Lightroom will not read or download new photos taken on the original D800!
I have searched for new updates to the Lightroom software but tells me that my sorter is up-to-date.
Help please!
Hi andrewd,.
What version of Lightroom do you use?
Display the exact error message you get when importing.
D500 requires Lightroom 6.5/CC 2015.5. Cameras supported by Adobe Camera Raw
Kind regards
Assani
-
I can't download windows app store applications. Help, please!
I'm unable to download apps from the store. When I try to install any application, I get an error that could not purchase completed. It happens that the two time if I install a free or paid app. And the error code is 0 x 80070422 please help!
Thanks in advance.
I recommend you to try the fix described in the following article to resolve your issue:Hope this helps, good luck :) -
My text is not received my phone from apple. Help please
I got a new Apple Watch for Christmas. Other people get my texts, but my husband isn't? Is this something to do with I have messages?
Hello
On your iPhone, go to: settings > Messages > make sure you send as SMS is enabled.
Also on your iPhone, go to: Contacts app > check that your power plug for your husband understands its correct mobile / cell phone number, and, if it uses iMessage on an iPhone, the Apple ID email address.
After making any changes to their contact card, it can help to remove the old iMessage conversations with him on your iPhone and your Apple Watch:
-iPhone: app Messages > swipe to the left on a message thread > press Delete / Trash.
-Watch: Messages app (from the home screen - accessed by pressing the digital Crown) > swipe to the left on a message thread > press Delete / Trash.
-
I downloaded Firefox 5.0 beta (Aurora) recently and have been using it since it was available. I have a new computer I want to download Aurora, but I can't find where the load down to Aurora. Can help you. I've looked everywhere I can on Mozilla.com without help.
Thank you
Jim P
You can download anything but the here nightlies.
-
can you download a manual for canon sx510hs help please
Hi all.can anyono you tell me how to get a manual (download or whatever) it would be a great help rayjoan
http://gdlp01.c-WSS.com/GDS/1/0300012151/01/pssx510hs-CU-en.PDF
-
Specifically, I subscribe to Acrobat Pro Standard. When I open it, it's on the web. Previously, I got messages saying that my subscription has expired, but he didn't.
Hello Sharon,
I completely understand your frustration. Yes, it is very likely that you have ever downloaded Acrobat Pro (there is Acrobat Pro and Acrobat Standard - you have Pro).
You can download from this page: download Acrobat products | Standard, Pro | XI, X.
Because you have a subscription, no serial number is required. You just need to be connected to your account with your Adobe ID and password.
Best,
Sara
-
How can I solve my problem after that ios9.3.2 phone dosen't ring just viberates and custom except my wifi password can someone help
Look on the side of the phone and make sure that the 'secret' not turn it on.
-
I have a backup of windows 2010 dvd which I can't install because I lost the product key number. Is it possible to get it back? The only information I have is the number of order transaction. I also lost the confirmation email.
Contact the seller from whom you purchased it.
-
Worm or virus caused me to have to change my user profile in Windows 7. I have everything back to looking more or less as he did before this disaster on my computer and I am once again able to do in Internet Explorer, but when I go to my Thunderbird e-mail, it's like I've never used before and he wants me to set it all back up again. All contacts are gone and all of my old emails etc. How can I proceed to try to solve this problem?
-
The mask tab is missing from Speedgrade. Help, please?
Top right of the appearance tab, there should be a small disclosure triangle (directly in front of all, buttons shadow, midtowns and highlights). Click this button to open another Panel in the appearance tab. Alto! Snapshots, masks and annotations.
-
I downloaded an app from a worker ID mobile shop and I am still registered my ID and I am using the application normally but I wonder if he could access this application and see my pictures and conversations!
Any help please?
N ° unless you have given him your Apple ID and password, in which case he would have access to your entire account.
You must download the application using your Apple ID. Otherwise, you will have questions the next time the app must replace or update. Strictly speaking, what you were doing was not quite legal, oven if it was a free app.
-
Can someone help me please? Adobe keeps giving me the run around. Long story short, my computer crashed and I need to reinstall my CS4 Design Premium software. After contacting Adobe, one of their people to chat live gave me a link where I downloaded a .dmg file. However, I don't know how to reinstall the software from there. Help, please! Here is a screenshot showing the file .dmg (below), when I click the red box appears (upper-left), and then I click on the first red folder marked Adobe CS4 Design Premium and the following window appears (in upper right). Now what should I do to download the software?
Hi Bragi,
Please click the red color of file of CONFIGURATION in the window at the top right to install CS 4 design premium.
This theme has a video explaining the process check: products install Adobe Creative Suite 4 | Windows, Mac OS
Kind regards
Sandrine Bani
Maybe you are looking for
-
HD 5650 has new Catalyst Control Center 12.4 with 8.95 drivers!
Closed by Sunshine Yes, I was really tired of it anyway.
-
Satellite M100-165: connection to the LAN operarte correctly
I have a Satellite M100-165 for about 2 years with the original Setup (win XP etc) and I make all updates.The problem is that the connection to the local network is working properly from the beginning. I can connect only if I set the NIC property "li
-
Wanting to connect two monitors
I have an HP 110-090 desktop PC. I bought an adapter where can I plug 2 monitor cables into the one port at the rear (the blue one). Both monitors display the screen but when I check the box so that it can extend the desktop and only show the icons
-
I bought the Fuze + because I waited for years to get a 50 GB or State more solid with radio and recording. 16 + 32 does really everything for me. But like many here I am blocked by performance, poor scrolling, etc. by this device. I'm staying curr
-
Photosmart C309A does not install on Windows 8.1
Hello. I managed to download the correct software and double the download so it extracted but after exrtraction nothing happens. Can anyone help?