• Post Reply Bookmark Topic Watch Topic
  • New Topic

NullPointerException  RSS feed

 
Sarika Sukumaran
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why "BufferedImage image = ImageIO.read(new ByteArrayInputStream(imageBytes));" returns null value?


 
Tim Moores
Saloon Keeper
Posts: 3512
77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll bet you dollars to donuts that "instance.toString()" does not return anything remotely resembling what you seem to assume it returns.
 
Sarika Sukumaran
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your response. Could you please help me to achieve the target?
 
Tim Moores
Saloon Keeper
Posts: 3512
77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depends on what you intend to do. It looks like you're trying to convert a PDF to a (series of) images. I've never tried that, but I noticed that the com.lowagie.text.Image class has methods called getOriginalData and getOriginalType; those might be useful for that task.

If that's all you're trying to do, you might check out the PDFBox library, which has this functionality (amongst others).
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!