Class RollingFileStream.MeteredStream
java.lang.Object
java.io.OutputStream
org.apache.derby.impl.services.stream.RollingFileStream.MeteredStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Enclosing class:
RollingFileStream
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) OutputStream
The real OutputStream to delegate to(package private) int
The number of bytes written so far to the OutputStream -
Constructor Summary
ConstructorsConstructorDescriptionMeteredStream
(OutputStream out, int written) Creates a new instance of MeteredStream -
Method Summary
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write, write
-
Field Details
-
out
OutputStream outThe real OutputStream to delegate to -
written
int writtenThe number of bytes written so far to the OutputStream
-
-
Constructor Details
-
MeteredStream
MeteredStream(OutputStream out, int written) Creates a new instance of MeteredStream- Parameters:
out
- The OutputStream to delegate towritten
- The number of bytes currently written to the OuptutStream
-
-
Method Details
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
getWritten
public int getWritten() -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-