Hi freiends --  to know how to convert an OuputStream to an Input Stream

I am using generating reports thru IReports and i am trying to convert an ouput received from a .jrxml file into an .pdf file This is how my code goes.
System.out.println("inside ReportGenerator()");
          InputStream bais = new ByteArrayInputStream(input.getBytes());
          JasperCompileManager.compileReportToStream(bais,out);
          bais = new ByteArrayInputStream(out.toString().getBytes());
// i am gtting an error over here it say unable to load an input stream.
          JasperFillManager.fillReportToStream(bais,out,new HashMap(),con);
          bais = new ByteArrayInputStream(out.toString().getBytes());
          JasperExportManager.exportReportToPdfStream(bais,out);
could anyone plz help me

InputStreams and OutputStreams are not interchangeable, or even particularly convertible. They do inherently different things.
Sometimes it's possible to string them together, but it's not even clear from your code whether that's appropriate for your problem.
Probably you should be creating a whole new output stream, completely separate from the input stream. But who knows; you didn't explain what you're trying to accomplish.

Similar Messages

  • I have a MacBook Pro, I want to copy Itunes files to an SD card to play in my car, the SD Card doesn't appear in Itunes when I insert it, and I don't know how to convert the files to the correct format, can anyone help?

    I have a MacBook Pro, I want to copy Itunes files to an SD card to play in my car, the SD Card doesn't appear in Itunes when I insert it, and I don't know how to convert the files to the correct format, can anyone help?
    Thank you

    So it seems from reading the COMMAND manual that my first issue is that I used a 16GB SD card, and the manual says it will only recogize up to a 2GB SD card. I did use my MB Air's SD card slot and crated a folder and dragged the music files to it, then to the card. So I am going to get a 2GB card and try that next. Otherwise just stick with the iPOD connected. At least that is 8GB

  • Does anyone know how to convert an XML file to a readable file?

    All,
    I have been using an APP called "SMS Backup & Restore" to backup my message conversations to my Laptop PC.  It works fine BUT the backup file, once in my PC, has an XML extent such as "filename.XML"
    I would like to read and/or print and/or save the text message file so does anyone know how to convert the XML file to something else so it shows all the messages without all the formatting instructions.   
    When I try to see the XML file it shows all the formatting.  If I replace the .XML with .TXT that too shows all the formatting mixed in with the text message narrative.
    When I look at the XML file in SMS Backup & Restore in the Charge phone it looks great showing all the messages just as they were on the phones display.  The problem with this is that there is no way to print or read or save the messages as they appear in the file from the phone itself.  I tried screen capture but if you have, let's say, a 28 message conversation you have to do 7 or 8 screen captures to get them all.
    If only I could convert the XML in my PC to something that is printable or savable or readable that would be the "cats meow."
    Anyone know how???
    JerryF
    PS, You might take a look at my related post.
    https://community.verizonwireless.com/message/809832#809832

    Ann154,
    You were correct again.  I deleted everything I had done to date and re-did the entire SMS backup of my 28 message conversation again and YES I was able to open it using IE-8.  It looks great and it prints great and life is good!  I am going to go make a donation.
    Thanks again for the help.  I marked this thread as answered by you.
    JerryF

  • Does anyone know how to convert iTunes TV subscription downloads to files that I can put on a backup drive and watch on my TV vs. MacBook?

    I purchased a TV series from iTunes and downloaded the HD version. I then copied it to a backup drive so I could plug it in to my DVD player to watch. This would not work. Does anyone know how to convert the files so they are watchable on TV rather than on my MacBook?

    Video in the new iOS is under the application Videos. You should be able to find things there.

  • How do I open my H&R Block tax files, transferred to my Mac Pro from my PC? I guess they're in Windows format,but I don't know how to convert.

    How do I open my H&R Block tax files, transferred to my Mac Pro from my PC? I guess they're in Windows format,but I don't know how to convert.
    CaptainTom1

    There should be an H&R block format.  Windows or no.
    Just like JPEG or MP3 is a format readable by Mac or PC.
    The main cause of PC vsWindows files issues is in "text only" files that require "line terminators".  Windows line terminaotrs are <CR><LF>, UNIX is <LF>, Mac can be <CR> or a <LF>.  The text editors that are PC-files-only cannot properly read text lines terminated with <LF> only.

  • Do anyone know how to convert a decimal to binary, 1 into 01

    do anyone know how to convert a decimal to binary
    i wants to convert 1 into 01, but the computer print out 1, it didn't print 0
    also 0 it also print only 0, and 3 it print11
    so decimal of 3, the computer print correct, but 0 and 1 it print wrong
    how can i print 01 if my decimal is 1
    int a=1;
    System.out.print(Integer.toBinaryString(a));
    can anyone help me solve this question
    and
    you can use java or jsp
    if you can use jsp it would be better, if not use java

    it's not printing anything 'wrong'.
    0 in binary is 0
    1 in binary is 1
    All it's doing is cutting off leading zeros since they don't change the value.
    1 is the same as 01 is the same as 00000001...no difference
    Similarly, when you print decimal 3 as 11, it could just as easily say 00000011 and be correct, since the zeros don't change anything.

  • Does anyone know how to convert the output from the standard report to xml?

    Does anyone know how to convert the output from the standard SAP report to xml?

    since it a standard report which you cannot modify you can only do the following.
    submit report exporting list to memory
    then
    list from memory and then
    use the returned itab along with CALL TRNSFORMATION key word to convert to xml.
    but this only going to place the whole list content (including data and formating lines,etc) into a xml element and not the actual data alone in the list .

  • Anyone know how to convert a 3D sphere .STL file into a .igs file?

    Anyone know how to convert a 3D sphere .STL file into a .igs file?

    And for what? Why? This would be kinda atrocious and awful, but weird things happen...
    Mylenium

  • Anyone know how to convert audio to mini flies in garageband?

    anyone know how to convert audio to mini flies in garageband?

    same as your last post, what is a "mini" file?

  • Does anyone know how to convert a novel manuscript, written in Pages, to an Amazon e-book and CreateSpace document?

    Does anyone know how to convert a novel manuscript, written in Pages, to an Amazon e-book and CreateSpace document?  Do I need to purchase Word for my iBook?

    Susan,
    You need to create a pdf file of the document to print using CreateSpace. Check their size requirements and set up your document to fit those, make sure your cover has the correct bleed if the cover image goes "off the edge", and work your way through the guided system on CreateSpace. If you know someone who has done a book there, they might be able to help you, too. I will be doing a book from an author who used Pages soon, too, and though I use InDesign, he does not. I don't anticipate any problems with it, as a pdf is a file structure with which CreateSpace is familiar.
    You can also use their more tutorial-like set-up, too, perhaps, at least the first time through the process. I typically help first-time users through the process when I've helped create their books, too. It's mostly straight-forward, minus the upload problem I'm currently dealing with with my computer, of course!

  • Does anyone know how to convert file into a .png?

    Does anyone know how to convert file into a .png?
    Thanks

    I tried to give an answer with less steps. I know it's a Pages file & all you have to do is select & copy the content in your Pages file & then open Preview.app. Next time I'll include the exporting to PDF & opening that in Preview.app or in Pages go to File > Print > click on the PDF button in the lower left of the print window & choose Open in Preview.

  • Does anyone know how to convert 3GPP videos to the iPhone 4S?  I have favorite videos I would like to transfer to my new phone.  Any help would be appreciated.  Thank you.

    Does anyone know how to convert 3GPP videos to the iPhone 4S?  I can sync my photos from my computer but not my videos.  Any help would be appreciated.  Thank you.

    Hello,
    This link may be useful to you:
    http://www.iorgsoft.com/iphone-4s/convert-3gp-to-iphone-4s-on-mac.html

  • Does anyone know how to convert the .deploy file to ant script

    hi guys ,
    I am doing some work relate to J2EE/ADF application deployment. I need ant script to compile/ear and remote deploy.
    Does anyone know how to generate the ant script based on the .deploy file (eg.ejb.deploy and webservice.deploy ).
    although I can generate the ant script with creating buildfile from project ,but all the ant tasks are just compile ,no other deploy task...
    I much appreciate if anyone can give me a clue
    Kevin

    I don't know how to convert a .deploy file but you may use below commands to remotely deploy an ear file
    To compile
    c:\Oracle\Middleware\jdeveloper\jdev\bin\ojdeploy -profile EarProfile -workspace MyApp\MyApp.jws
    To Deploy
    c:\Oracle\Middleware\wlserver_10.3\server\bin\setWLSEnv.cmd
    java weblogic.Deployer -adminurl http://localhost:7101 -user weblogic -password weblogic1 -deploy -upload MyApp\deploy\EarProfile.earMore Details
    http://edocs.bea.com/wls/docs100/deployment/understanding.html#wp1057841

  • Does Anyone Or Does Everyone Except Me Know How To Convert Audio To MIDI?

    Hello. I'm your new neighbor... I'll be good in the hood... I've been using Logic for 3 years. I have been mixing 14 Tracks of Audio ever since... Never again. No, never, ever, ever, ever again! Ever!
    Two questions: Can Logic Pro 7 "Convert" Audio into MIDI? If not will you kindly impart knowledge to Grasshopper which "Software" is widely accepted as the best?
    I'll check with Sound On Sound if no one has info here... Thanks.

    Does it usually take a long time for Replys? I once asked a simple question in a Recording Studio Forum and waited 20 minutes and said: "This *****, I'm outta here" I returned a year later and found 50 messages saying how impatient I was and even a few kicks in my iAss.
    I was a real newbie. More dollars than sense... Avalon, SPL, T.C. Elec... blah-blah. "I'll 'Master my own stuff!" So, I wanted to use the Hardware to "soften". Not a peep! Hello-o-o-o-o-o! All I had was pretty lights glowing.
    When I learned the following day, it was only a 'Click' or two away. Usually is with Mac. I love my G5 for Music Production. I've tried 2 PowerBooks an 864(?) and a 1 GHz 17", neither could handle the load of 60 Tracks of Audio. G5, I have increased the Tracks to 78. We're talkin' smokin' trackin' Tracks.
    I'll see if I have an answer to:
    Does Anyone Or Does Everyone Except Me Know How To Convert Audio To MIDI?
    If not I'll slip away quietly and wonder... Does anyone know? I'll return with how to or what to use tomorrow. Then we'll all know!

  • Do you know how to convert form pdf to pages then to word doc?

    Hello Everyone I use pages #Iwork #Mac so basically I have a pdf document with contains equations which I have to transcribe to a word document. But I don't know how to get started for adding these equations.. I will thank you so much http://img716.imageshack.us/img716/163/screenshot20130420at658.png
    Please help me I am new with mac
    I scanned this document frome of a page of papaer and I have to trascribe to a word document but actually I don't how to do that.

    There’s a easy and free way, just go to docs.google.com, click the upload button to upload your pdf file. Remember to check the option "Convert text from PDF or image files to Google Docs documents " before you click the “start upload” button. After the upload is done you can find the converted file on your Google Docs, now copy the texts to an empty word file, done! With this method you can also convert pdf to ppt if you copy the converted tsts to your empty ppt file. Or you can simply use a PDF to word converter, Adobe has a professional software that can do that but I can't think of the name right now.

Maybe you are looking for

  • Can I replace my itunes library with another user's on the same computer?

    I just inherited a MacBook that has the previous user's iTunes library.  I'd like to use iTunes to backup my iPhone 5s without mixing my library with his.  How can I completely remove the old iTunes library before I sync my phone to this laptop?

  • Can I make my external hard drive hook up to my thunderbolt port

    So I have 2 USB Ports on my Mac. I use both of them and I am looking to get a Mic for recording youtube stuff. I use one for my wireless mouse, and I use the other for an external hard drive because the amout of space on my Mac is no-where near enoug

  • New calling feature in OS X 10.10 needs a keypad

    The new calling feature works great in OS X 10.10, until you come across an automated phone system... No keypad. Hopefully that will get updated. I can't imagine Apple didn't think about this.

  • BLS signature implementation in java

    Hi all, I want to use the BLS signature in my project but I am unable to find any java implementation.. Anybody knows if it is available?? and can u please point me to that??? I did find the C implementation library [http://crypto.stanford.edu/pbc/ ]

  • RPM Project Upload Performance

    Hi, We are using RPM for the first time and users are noticing very slow performance when uploading projects into the system.  It is taking approx 20 minutes to upload 150 projects.  We are on RPM 4.5 with BW 7.00.  We don't have cProjects installed.