Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DocumentBuilder parse call fails

 
liliya woland
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an InputStream iStream. I cat view the characters in it when I do a while-loop.
So I want to put this iStream into a DocumentBuilder builder.
When I do the following

I get an error "org.xml.sax.SAXParseException: Premature end of file."
Could someone please tell me what I could do different here to parse iStream?
Thanks a lot.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic