Class VitamStreamingOutput
java.lang.Object
fr.gouv.vitam.common.server.application.VitamStreamingOutput
- All Implemented Interfaces:
VitamAutoCloseable
,AutoCloseable
,javax.ws.rs.core.StreamingOutput
public class VitamStreamingOutput
extends Object
implements javax.ws.rs.core.StreamingOutput, VitamAutoCloseable
Helper for Streaming to output one InputStream or File in non async mode
-
Constructor Summary
ConstructorDescriptionVitamStreamingOutput
(File file, boolean toDelete) VitamStreamingOutput
(InputStream inputStream) -
Method Summary
-
Constructor Details
-
VitamStreamingOutput
- Parameters:
inputStream
- the inputstream to forward without Async mode
-
VitamStreamingOutput
- Parameters:
file
- the file to outputtoDelete
- If True, will delete the file once sent
-
-
Method Details
-
write
- Specified by:
write
in interfacejavax.ws.rs.core.StreamingOutput
- Throws:
IOException
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceVitamAutoCloseable
-