is it possible to find if there are data not written to data storage

  • Thread starter Thread starter Tony Johansson
  • Start date Start date
T

Tony Johansson

Hi!

Assume I have a stream. This stream should write some data to a data storage
Is it possible to find out if there are any data left in the stream that
will be written if I do a flush.

//Tony
 
Tony said:
Assume I have a stream. This stream should write some data to a data storage
Is it possible to find out if there are any data left in the stream that
will be written if I do a flush.

Without more specifications: No.

Define "a stream" and "a flush".

If System.IO.Stream is what you are talking about, then no. Maybe
concrete implementations of System.IO.Stream offer such capabilities,
but even then I would not consider it useful.

You "flush", the stream sorts out the if and how (or should so, IMO).
 
Assume I have a stream. This stream should write some data to a data storage
Is it possible to find out if there are any data left in the stream that
will be written if I do a flush.

Not using any supported/documented interface.

Why not just call Flush?

The overhead of an extra Flush call that does
nothing must be insignificant.

Arne
 
Back
Top