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.
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 ?