KM images retrieving in Applications   ----Java gurus please help -- URGENT

Hi,
I am retrieving images from KM in the webdynpro application and then displaying Adobe Interactive Form with the help of the blog :
/people/bobu.georgeputheeckal/blog/2006/12/22/getting-an-image-from-km-documents-to-be-used-in-web-dynpro
But the images i could retreive are atmost  20kb , if the size of the image is more eg : 70kb , the image is not displaying . In the code of the blog :
//Reading the image file……
BufferedInputStream bufIn =
new BufferedInputStream(resourceimg.getContent().getInputStream()); *
byte[] imagebyte = new byte[bufIn.available()];
bufIn.read(imagebyte);
Wile  getting BufferedInputStream object from resource object ,,,,,,,if the size is say 70KB ,,,,it is giving problem .But if the size is less say 10KB it is ok .
Pls anyone provide me to overcome this problem and can get byte[] ,,, and can proceed further for larger images .
Thanks and Regards,
Srini
Edited by: srinivasa rao on Feb 20, 2008 6:39 PM

Srinivas,
I think that's because the default filesize for BufferedInputStream class is 2048 bytes.
Change your code as follows and check if it resolves your issue:-
BufferedInputStream bufIn =
  new BufferedInputStream(resourceimg.getContent().getInputStream(), Integer.MAX_VALUE);
byte[] imagebyte = new byte[bufIn.available()];

Similar Messages

  • URGENT!!! Java Gurus Please Help with adf issue!

    PLEASE SEE MY LATEST POST BELOW TIMO'S RESPONSE. THE REQUIREMENT HAS CHANGED. THAT IS THE ISSUE I AM LOOKING A SOLUTION FOR.
    Hello All,
    We have a requirement where our adf/jsf app needs to pick an EXCEL file from the server where the application is deployed. The sequence is :
    User comes to the page
    Clicks on "Open EXCEL" button
    EXCEL file located in the c:/ of the server opens up.
    How can this be done? I do not see any coding needed because the EXCEL file is being opened as is (and after user views it he closes the file) and the data is not being transferred to the jspx page.
    *We are totally flexible in how this is implemented - ie, using button, link , html etc etc. What ever works!!!!*
    Thanks,
    Edited by: user12054715 on Aug 17, 2010 8:54 PM
    Edited by: user12054715 on Aug 18, 2010 4:11 PM
    Edited by: user12054715 on Aug 18, 2010 4:13 PM

    Hello Timo,
    I am using 10.1.3g so your response is not going to help me.
    However, I have another question that I have already posted on the Forum. Please help me...
    Requirement:
    *1. Java application should be able to write "Hello World" in the excel file, when the user opens it.*
    I CAN DO THIS WITH THE FOLLOWING CODE:
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet sheet = wb.createSheet("newSheet");
    HSSFRow row = sheet.createRow(1);
    row.createCell(1).setCellValue("HelloWorld!!!!!!!!!");
    *2. A "Write To Excel" button on jsf page opens a dialog asking user to Save or Open the excel file. (user can save the file anywhere on his machine)*
    I CAN DO THIS WITH THE FOLLOWING CODE:
    In jsf:
    <af:commandButton text="Download" action="#{myBackingBean.writeToExcel}" useWindow="true"/>
    In backing bean:
    public static void writeToExcel() throws IOException
    String filename = "workbook.xls";
    // //Setup the output
    String contentType = "application/vnd.ms-excel";
    FacesContext fc = FacesContext.getCurrentInstance();
    HttpServletResponse response = (HttpServletResponse)fc.getExternalContext().getResponse();
    response.setHeader("Content-disposition", "attachment; filename=" + filename);
    response.setContentType(contentType);
    PrintWriter out = response.getWriter();
    BOTTLENECK: When the user opens the excel how do I show "HelloWorld!!!!!!!!!" ?

  • Java Gurus  please  help

    i have to buid a screen saver with my companys logo on it which is a flash file any idea how i can do that
    Thanks in advance

    so you tell me how do i create it !! Iam familiar with java thats why i thought so please tell me how to craete

  • All u java gurus -please help me with my DAEMONS

    I had already posted one query regarding the same but due to some unsatisfactory answers I am forced to ask the same question.
    JUST TELL ME HOW TO WRITE DAEMONS IN JAVA- REST I WILL MANAGE
    heres my problem:
    I have to make a java program to backup and restore encrypted files over a network.
    The daemon should :
    1 . The daemon has to be able to send messages to all other comps in the network that a user on some machine wants to backup or restore a file.
    2. It also needs to be able to find all the files backed up of others as well as my own files on my PC.
    3. I will maintain files placed on each PC using hash tables for efficient searching.When this is done the daemon will figure out from a heap of free disk space how many comps are to be involved.I then use a TCPserver or TCPclient class to open connections to them and send or receive encrypted files.
    4. Daemon will send messages across the network if any system change(disk space +/-) occurs.Can anyone give me some documentation and links on the same?
    Yeah,one more thing how will that daemon calculate free disk space on my computer -any methods would be appeciated -This willl determine what computers to select for back up.
    IF all the above doesnt make any sense just tell me how to write a daemon-I need the code for this.
    Also how will ensure that my daemon will run at the same time a machine boots up.
    help for any part will be appreciated

    Check out the apache commons daemon library and associated stub program. http://jakarta.apache.org/commons/daemon/
    AFAIK There's no quick way in the Java libraries of measuring free disk space. Best bet is to exec the appropriate command line utility and read the results programatically.

  • Starting tomcat problem, please help urgent

    I installed jwsdp on windowsXP . The log file gives this following error when i try to start tomcat:
    java.util.zip.ZipException: Access is denied
         at java.util.zip.ZipFile.open(Native Method)
         at java.util.zip.ZipFile.<init>(ZipFile.java:127)
         at java.util.jar.JarFile.<init>(JarFile.java:138)
         at java.util.jar.JarFile.<init>(JarFile.java:80)
         at org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(StandardClassLoader.java:1081)
         at org.apache.catalina.loader.StandardClassLoader.<init>(StandardClassLoader.java:200)
         at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:202)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:141)
         at java.lang.reflect.Method.invoke(Native Method)
         at org.apache.commons.launcher.ChildMain.run(ChildMain.java:269)
    Bootstrap: Class loader creation threw exception
    java.lang.IllegalArgumentException: addRepositoryInternal: java.util.zip.ZipException: Access is denied
         at org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(StandardClassLoader.java:1109)
         at org.apache.catalina.loader.StandardClassLoader.<init>(StandardClassLoader.java:200)
         at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:202)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:141)
         at java.lang.reflect.Method.invoke(Native Method)
         at org.apache.commons.launcher.ChildMain.run(ChildMain.java:269)
    PLEASE HELP ,URGENTLY NEEDED TO SHOW SOME WORK ON THIS.
    THANKS
    jim

    Hi,
    I have a similar problem, i try to deploy a JAR file built on AIX 5.2 platform (jvm 14.1) into Tomcat 5.5.7 running on Windows platform when i try start Tomcat it's fail with the fellowing message
    SEVERE: Error deploying web application directory usi
    java.lang.IllegalArgumentException
         at java.util.zip.ZipInputStream.getUTF8String(ZipInputStream.java:299)
         at java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:238)
         at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:73)
         at java.util.jar.JarInputStream.<init>(JarInputStream.java:58)
         at java.util.jar.JarInputStream.<init>(JarInputStream.java:43)
         at org.apache.catalina.util.ExtensionValidator.getManifest(ExtensionValidator.java:368)
         at org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:187)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:3942)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
         at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:909)
         at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:872)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1106)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1019)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:440)
         at org.apache.catalina.core.StandardService.start(StandardService.java:450)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)

  • I had my ipod this week, so I do not know which applications to install. please help me

    I had my ipod this week, so I do not know which applications to install please help me    thank you in advance

    You can buy any apps that you want.

  • I can not access the calendar, reports that calendar application unexpectedly ended. please help

    I can not access the calendar, reports that calendar application unexpectedly ended. please help
    Os Mountain Lion

    Which install type did you choose? If you chose Custom, you may not have installed OHS at all...

  • PASSWORD FOR FLODERS  PLEAse  HELP URGENT

    HI ALL
    please tell me the method of implementing password
    provision for some folders/files in the system.
    it should ask for password authentification before
    opening when i click on the folder.
    please help urgent
    thanks
    belur

    Hi Swaroopba,
    It can be very well done thru Form based Authentication.
    For eg let me explain with respect to Tomcat.
    Go to
    $TOMCAT_HOME/webapps/examples/WEB-INF directory.
    Please add the following code in it.
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Protected Area </web-resource-name>
    <!-- Define the context URL's to be protected -->
    <url-pattern>/jsp/security/protected</url-pattern>
    </web-resource-collection>
    </security-constraint>
    Please add the following code in it. And you have to specify the roles for it.
    I hope this will be helpful for you.
    Or if you want it in an application, please let me know.
    Thanks
    Bakrudeen

  • Please Help - Urgent

    Hi everyone, I�m having problems with Java Mail, I have just installed it along with the java activation framework, they are located in the following directories:
    JavaMail: C:\jdk1.3.1\lib\javamail-1_2[1]
    Java activation framework: C:\jdk1.3.1\lib\jaf1_0_1[1]
    I have the classpath set as: C:\jdk1.3.1\lib\mail.jar;C:\jdk1.3.1\lib\activation.jar
    When I try to compile the sample code provided with these packages, msgsend.java using Jbuilder 2 I get the following errors:
    Error (36): cannot access directory javax\mail.
    Error (37): cannot access directory javax\mail\internet.
    Error (209): class message not found in class msgsend.
    Error (210): class MessagingException not found in class msgsend
    Error (134): class Session not found in class msgsend
    Error (134): variable Session not found in class msgsend
    Error (139): class Message not found in class msgsend
    Error (139): class MimeMessage not found in class msgsend
    Error (141): class InternetAddress not found in class msgsend
    Error (145): cannot access class Message.RecipientType;neither class nor source found for Message.RecipientType.
    Error (146): Variable InternetAddress not found in class msgsend
    Error (148): cannot access class Message.RecipientType;neither class nor source found for Message.RecipientType.
    Error (149): Variable InternetAddress not found in class msgsend
    Error (151): cannot access class Message.RecipientType;neither class nor source found for Message.RecipientType.
    Error (152): Variable InternetAddress not found in class msgsend
    Error (162): Variable Transport not found in class msgsend
    Error (170): class Store not found in class msgsend
    Error (172): class URLName not found in class msgsend
    Error (172): class URLName not found in class msgsend
    Error (189): class Folder not found in class msgsend
    Error (195): Variable Folder not found in class msgsend
    Error (197): class Message not found in class msgsend
    Error (197): class Message not found in class msgsend
    If I try to use another Java package to compile it I get even more errors (52), I cannot compile it by using the Javac command line compiler, it just says �Bad command or file name�.
    Can anyone tell me Why this is happening and how I might be able to fix it please, I need to start learning Java Mail quickly but at the moment I can�t even begin to do this until I can understand how to get this sample code to work.
    Thanks Everyone
    Noel

    First of all... don't post with topics like "Please Help - Urgent". The topic is supposed to reflect what the question is about.
    Secondly... think for a second. If mail.jar is in C:\jdk1.3.1\lib\javamail-1_2[1]... why are you with your classpath saying that mail.jar is in C:\jdk1.3.1\lib ?
    You classpath is supposed to point directly at you jar-files.
    /Michael

  • I want to buy an in-app purchase but i don`t remember my security questions and i cant access my recovery email either, what can i do? i have 100$ on my account and cant use it because of that problem, please help URGENT

    I want to buy an in-app purchase but i don`t remember my security questions and i cant access my recovery email either, what can i do? i have 100$ on my account and cant use it because of that problem, please help URGENT

    If you have a rescue email address on your account then you can use that - follow steps 1 to 5 half-way down this page will give you a reset link on your account : http://support.apple.com/kb/HT5312
    If you don't have a rescue email address (you won't be able to add one until you can answer your questions) then you will need to contact Support in your country to get the questions reset : http://support.apple.com/kb/HT5699

  • Please help URGENT : Chinese handwriting doesn't seem to work on Lion OSX. the handwriting trackpad appears but anything i write in Chinese doesn't appear in word, chrome,..... HELP PLEASE

    please help URGENT : Chinese handwriting doesn't seem to work on Lion OSX. the handwriting trackpad appears but anything i write in Chinese doesn't appear in word, chrome,..... HELP PLEASE
    And in system prefs/language and text/input languages, simplified chinese and traditional chinese are ticked as usual with handwriting options on !!!!

    Please search the forum for "chinese" to find the many other earlier posts about your issue, like
    https://discussions.apple.com/message/15746805#15746805

  • I bought an iphone 5 on 01 February 2013 from your store to use in Turkey. But the phone is sim-locked. What can I do now?  Please help urgently.

    I bought an iphone 5 from apple store in Geneva to use in Turkey. But it is sim-locked. What can I do now. Please help urgently.

    Return it to the store where you purchased & get your money back. Either that, or call the store. No one here can help you, as there is no one from Apple here.

  • How to download garageband old version? i mean version 1.0 to install it on iphone 4s with ios 6.0.1??? please help urgently, how to download garageband old version? i mean version 1.0 to install it on iphone 4s with ios 6.0.1??? please help urgently

    how to download garageband old version? i mean version 1.0 to install it on iphone 4s with ios 6.0.1??? please help urgently, how to download garageband old version? i mean version 1.0 to install it on iphone 4s with ios 6.0.1??? please help urgently

    I did this a few weeks ago to be sure it was going to work for a young person I was giving my ipod to.  Then I reset the information for her and now it will not load.  Very sad.  She is so talented and she really needs this.   Anyone know?

  • I received an iCloud backup notification on my ipad mini but tapping "OK" does not remove it and therefore I am unable to do any activity on my ipad mini. please help urgent.

    I received an iCloud backup notification on my ipad mini but tapping "OK" does not remove it and therefore I am unable to do any activity on my ipad mini. please help urgent.??

    Have you tried a reset ? Press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider if it appears), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • Please Help Urgently to refresh the report on the change in data

    We want to refresh report at runtime for the Drill Down report if any user changes the Data. We changes the data from the form which is called from the report and we want to this effect on the report on the prompt.
    Is there any method to close the report while it is in the queue of Background Engine? Can we refresh the report ? Please help urgently.
    Thanks in Advance.

    Pritesh,
    Reports goes out to the database and fetches the data (not a snapshot) and returns the information, formats it and displays it. The only way to refresh, is to rerun the report.
    If your are running from the server, you need to make sure you are not fetching from cache (you determine this from destype and set the life of the cache in the servername.ora file).
    I am unaware of any way to programatically close the report once displayed. The user must take action to close the report (unless you call the operating system to kill the display). When you rerun the report from Oracle Forms, you will get fresh data.
    Regards,
    The Oracle Reports Team jls

Maybe you are looking for

  • "How to get distinct values of sharepoint column using SSRS"

    Hi,     I have integrated sharepoint list data to SQL Server reporting services. I am using the below to query sharepoint list data using sql reporting services. <Query>    <SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAc

  • How can I open an iPhoto photo directly from Photoshop Elements 6?

    Hi... I thought I read here in this forum how to open a photo that's in iPhoto ('09), directly from PSE 6. While in PSE 6, I go to File>Open>Photos(in Finder Sidebar)>then click on photo(s) in iPhoto and click on "Choose". But when I do this, the "Ch

  • Book Module Export PDF Quality Poor - any solutions?

    Hello, I am trying to figure out a solid solution / workflow for making PDF porfolio's for clients. The commercial studio where I work needs to send pdf portfolio's to potential clients quite often. So far we have not been able to find a perfect solu

  • How to convert lower case to upper case?

    Hi, How to convert lower case letter to upper case and vice versa?

  • RAW developer for Bayer GB12

    Greetings, I am a newbie to the forum and planning to use a 12MP video camera with APS-C size CMOS sensor as still-picture camera for night photography.. The outputs are Bayer GB10 and Bayer GB12. I would like to develop the pictures on a separate on