- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- org.arakhne.afc.progress.ProgressionOuputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class ProgressionOuputStream extends FilterOutputStream
OutputStream that is able to notify about the writing progression.- Version:
- 17.0 2020-01-04 14:41:38
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- util
-
-
Field Summary
-
Fields inherited from class java.io.FilterOutputStream
out
-
-
Constructor Summary
Constructors Constructor Description ProgressionOuputStream(OutputStream out, int totalSize, Progression progression)Construct a progression output stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()ProgressiongetProgression()Replies the progression model used by this input stream.voidwrite(byte[] buffer)voidwrite(byte[] buffer, int off, int len)voidwrite(int abyte)-
Methods inherited from class java.io.FilterOutputStream
flush
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
ProgressionOuputStream
public ProgressionOuputStream(OutputStream out, int totalSize, Progression progression)
Construct a progression output stream.- Parameters:
out- is the output to writetotalSize- is the total number of bytes to write in the stream.progression- is the progression model used to notify on the reading progression.
-
-
Method Detail
-
getProgression
public Progression getProgression()
Replies the progression model used by this input stream.- Returns:
- the progression model.
-
write
public void write(int abyte) throws IOException- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
write
public void write(byte[] buffer) throws IOException- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
write
public void write(byte[] buffer, int off, int len) throws IOException- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterOutputStream- Throws:
IOException
-
-