• Post Reply Bookmark Topic Watch Topic
  • New Topic

could we ignore few lines from an BufferedReader input stream  RSS feed

 
Chandhrasekar Saravanan
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone,
is it possible to ignore few lines from
input stream and make the fourth line as the
start of the document.
i am working on reading an soap file. i
want to ignore HTTP messages from it and start
the document as XML to enable parsing.
are there any solution, so that my input
stream reads only xml messages and ignore the
HTTP messages,
Thanks in advance
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The usual solution to this sort of problem is to just write a Reader which wraps whatever reader you are using, and eats the uninteresting lines when asked for the first one. Something like:

I'm not sure that just eating the first four lines is quite robust enough for your application, though. Are you sure that all SOAP sources will have exactly four lines of header to ignore ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!