How to show a pic from a specific file

Hi all i got a trouble here, well i stored pics in my database, well the function works ok when im trying to show a pic from the DataBase but my problem comes here when a pic is not found in the database i want to show a pic store in a file noPic.JPG here is my code
try{
sql="my select...."
ConexionPool cp = new ConexionPool();
ResultSet rs = cp.accesoBaseDatos(sql);
InputStream inputStream=null;
FileInputStream file= null;
file = new FileInputStream("\\imagenes\\SinFoto.jpg");
if(rs.next()){
inputStream = rs.getBinaryStream(1);
}else{
file = new FileInputStream("\\imagenes\\SinFoto.jpg");
** after this is the problem i dont know how to put this file in an InputStram format **
//rs.close();
return inputStream;
well i hope someone could help me how to convert a file into an InputStream or something like that, thanks

Duplicate post: http://forum.java.sun.com/thread.jspa?threadID=609919

Similar Messages

  • How do I copy photos from a specific file on PSE11 to a photo album that I created on my iTouch?

    When I try to sync a file on PSE 11 with my iTouch either from iTunes or from PSE I get a message that the file will be removed from my computer.
    How do I copy not move these pictures to the specific album that was created in iTunes?

    Your are welcome. Glad you got that sorted out. If you want to know about the new features in iOS 7, you can download the user manual here,http://manuals.info.apple.com/MANUALS/1000/MA1565/en_US/iphone_user_guide.pdf, you can open it in your iBooks as well.

  • How do you send pics from iPad?

    How do you send pics from iPad? I've tried to use the photos icon at the bottom, select the pics, and enter the email address. Problem is they never show up in the email. Any thoughts? I've also tried Pages app and a few others with the same result.

    I discussed the problem with Melissa at Apple. We tried reset, then we found about 50 attempts to email pics from Photos, stuck in Outbox. Deleted all of them, and we were able to send pic from Photos. Next day the problem was back, and emptying Outbox does not fix. Have not tried renewing account yet, worried about losing Inbox stuff.

  • How do I move pics from myverizon to my iPad?

    How do I move pics from myverizon to my iPad?

        Hello Olsakovsky, let's get to the bottom of this together! Are you using the Verizon Cloud storage currently with the pics backed up? If so, you can install the Verizon Cloud application on the iPad and click the Sync icon. View details: http://vz.to/1nsQZsd
    WiltonA_VZW
    VZW Support
    Follow us on twitter @VZWSupport

  • How do i upload pics from my iphone to my computer

    How do I upload pics from my iphone to my computer?

    janchatt1 wrote:
    How do I upload pics from my iphone to my computer?
    Import photos and videos from your iPhone, iPad, or iPod touch to your Mac or Windows PC - Apple Support

  • How do i download pics from my laptop to my desktop

    How do I download pics from my MacBook to my desktop?  I know I can burn a disk and download, but is there an easier way? Thanks!

    Or, if you have two compatible Macs with Lion, you can use AirDrop.
    There's a compatibility list here:
    http://support.apple.com/kb/HT4783
    Matt

  • How do I upload pics from my iPad to my PC?

    How do I upload pics from my iPad to my PC?

    I may have spoke too soon about it solving my issue.  I was able to connect and export the pics BUT only some of them uploaded and when I try to do it again it says there are no NEW pics to upload???? Now what???

  • How can you get pics from your Camera roll to you photo stream

    How can you get pics from your Camera roll to you photo stream

    iCloud: Photo Stream FAQ
    iCloud: Photo Stream
    iCloud: Set up Photo Stream

  • HOW DO I SAVE PICS FROM MY TEXT MESSAGES TO MY PHONE

    How do i save pics from my text messages, not very smart phone savvy!

    migjmh wrote:
    How do i save pics from my text messages, not very smart phone savvy!
    When you are viewing the test message with the picture in it, press and hold on the picture itself and it should vibrate and pull up a menu with the options of "View Picture", "Save Picture", and "Share Picture". Choose which one you want.

  • How do i save pics from facebook to my iphone 5?

    how do i save pics from facebook to my iphone 5?
    ive already tapped the actual pic and says to save,which i do but it doesnt save

    See Here  >  Syncing photos to devices
    From Here  >  http://support.apple.com/kb/HT4236

  • HT201269 how do i transfer pics from my previous iPhone's camera roll to my new iPhone?

    I recently switched phone service from my iPhone4 (on Verizon) to a iPhone5 (Sprint). Before trading the iPhone4 in to Sprint for a credit, I backed up all of the phone's data including pictures. After activating the new phone (the 5), I cannot figure out how to get the pics from the 4 (no longer in my possession). When I access my iCloud account, I can see where my previous phone's data was backed up before I traded it into Sprint.
    How did I use the iCloud or iTunes to get those pictures on my new phone?
    Thanks!

    Xkandrux,
    Thank you for your reponse.
    I opened iTunes, but could not see where to do that. How do i access iCloud information through iTunes?
    Forgive me all, I am an Apple novice.

  • How can I find history from a specific website on my MacBook Pro?

    How can I find history from a specific website (such as: time spent on that website and things of that nature) on my MacBook Pro?  I would also like to see if I can get a detailed history for other things done on the computer, such as: Date & Time Spent running a specific application, etc.

    Not so much.
    You can try 3rd party app for example http://timingapp.com/

  • How do I get pics from Preview into iphoto?

    How do I get pics from Preview into iphoto?

    While you are viewing a photo in Preview, and want to import it into iPhoto, select the document icon in the toolbar of the preview window and drag this icon onto the iPhoto icon in the Dock or in the applications folder.
    For example:

  • How do I get pics from iphone4 onto ipad 3rd g?

    how do I get pics from iphone 4s tho ipad 3rd g? also any software to put dvd's or videos on to ipad 3rd g?

    You can use 3rd Apps to transfer photos from iPhone to iPad
    http://i1224.photobucket.com/albums/ee374/Diavonex/d33e0f65.jpg

  • How do I convert pics from old Adobe Photoshop program on cd in pdd to jpeg?

    I have cds with pdd pics from my old (1999) Adobe Photoshop program.  My system won't open them.  I now have Photoshop Elements 8.  I can go to Organize and get photos from the cd.  They are in my catalog and I can open them there.
    How do I convert them to jpeg?
    When I go to Edit, I can't find my photos in the catalog.  I only find the new pics in my Photo Gallery that are already jpeg.
    I feel as though I'm missing something simple.  Can someone help me?

    Thanks for your response.  I did get a way to do it with the software I already have.
    Date: Thu, 27 May 2010 00:15:37 -0600
    From: [email protected]
    To: [email protected]
    Subject: How do I convert pics from old Adobe Photoshop program on cd in pdd to jpeg?
    There's a utility called "Image Converter Plus" that can do this for you.  They modestly calls it "the best image converter in the industry.  You can see their web site at:  http://www.imageconverterplus.com/help-center/work-with-icp/examples/how-to-convert/PDD_jp g.html .
    Here's from their web site:
    h1. How to convert PDD to JPG
    Converting PDD to JPG is very easy with Image Converter Plus. In Windows Explorer, select a PDD image and click your right mouse button. In the context menu, select Convert to submenu and click Custom convert line.
    ==========
    This seems to be exactly what you want.
    Since they have a separate "download" and "purchase" section, it's not clear to me if you have to pay the $49 license fee to use the utility.  You may have to purchase the license to get batch processing. 
    Even if you do have to pay, my philosophy in life is that if someone can rescue some important pictures with their $49 utility, then it's worth the price.
    >

Maybe you are looking for

  • Logical dimension table

    Hi All, I am creating logical columns using two logical dimensions in a separate logical table. Do I need create complex joins for the new logical table, two source logical dimension tables have complex joins created already. Could you anyone provide

  • The optic exit doesn't work correctly K8N Neo Platinium

    Hello I am French and I have just acquired a Mother Board MSI K8N Neo Platiniums   Of that someone uses the exit Optic Spidf.   There is a problem with, she is restores sounds of Windows as well as the reading of the MP3 well.   But if one connects t

  • 64,000 character limit on UDT user defined field column

    Hey All. We are storing more then 64,000 characters into a UDT user defined field column as it stores a large XML document. How can I retreive this information from the UDT using the DI API? Everytime I try to do this using either the UDT object or S

  • Export in Lightroom acting strange

    After many years of exporting jpegs at 300 ppi my Lightroom suddenly only exports at 72 ppi even though the image resolution is still set to 300 ppi. What could be the problem?

  • How to reinitialize SpamAssassin?

    I seem to have messed up my SpamAssassin on a fresh (not upgraded) install of Leopard Server. Near as I can tell things went south when I tried to use "sa-learn". The symptom is that no mail gets delivered while the "scan for junk mail" filter is sel