S
Shea Martin
I am using a deflater output stream, GZIPOutputStream specifically. I
need to know the number of bytes written out by the stream. Obviously
this is not the same number as the number of bytes I have given the
stream. It looks like the only way to get this information is through
the 'def' field, calling getBytesWritten(), or getTotalOut(), depending
on whether I want a long or an int. The problem is that the 'def' field
is protected. So to get this information, I have to subclass
GZIPOutputstream.
Surely, it is fairly common to need this information. Is this a design
flaw, or am I just too stupid to see an easier way to get this information?
Thanks,
~Shea M.
need to know the number of bytes written out by the stream. Obviously
this is not the same number as the number of bytes I have given the
stream. It looks like the only way to get this information is through
the 'def' field, calling getBytesWritten(), or getTotalOut(), depending
on whether I want a long or an int. The problem is that the 'def' field
is protected. So to get this information, I have to subclass
GZIPOutputstream.
Surely, it is fairly common to need this information. Is this a design
flaw, or am I just too stupid to see an easier way to get this information?
Thanks,
~Shea M.