The Artima Developer Community
Sponsored Link

Java Answers Forum
mark() and reset()

2 replies on 1 page. Most recent reply: Aug 20, 2003 10:08 PM by Prajna

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Prajna

Posts: 4
Nickname: prajna
Registered: Aug, 2003

mark() and reset() Posted: Aug 19, 2003 3:57 AM
Reply to this message Reply
Advertisement
The used jvm does not support(markSupported() returns false) a mark(bytes) and reset() operations on the given java.io.InputStream. Is there a way to solve this problem without creating any performance impacts ?


Can the stream be converted into a different type of stream for using mark() and reset() ?


Please also note the input stream represents a data file as huge as gega bytes in size and therefore writing onto a new file is not recommended.


Please reply asap.Thanks and Regards,
Prajna


David

Posts: 150
Nickname: archangel
Registered: Jul, 2003

Re: mark() and reset() Posted: Aug 20, 2003 1:54 AM
Reply to this message Reply
What are you trying to do?

Prajna

Posts: 4
Nickname: prajna
Registered: Aug, 2003

Re: mark() and reset() Posted: Aug 20, 2003 10:08 PM
Reply to this message Reply
Hi

We have an interface from a lower layer that opens up an input stream for processing. The stream is opened in a synchronous function call only once and WILL NOT be re-opened ! As a feature addition, we are introducing a pre-processing step to count total lines in file and then start the actual processing. We therefore have to revert back to the beginning of file...

I hope the reason is now clear.
Do you know of any solution for the same ?

Flat View: This topic has 2 replies on 1 page
Topic: How to get type from the input? Previous Topic   Next Topic Topic: Some problems... (  in realisiering of an idea )

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use