Package org.xwiki.filter.output
Class DefaultOutputStreamOutputTarget
- java.lang.Object
-
- org.xwiki.filter.output.DefaultOutputStreamOutputTarget
-
- All Implemented Interfaces:
Closeable,AutoCloseable,OutputStreamOutputTarget,OutputTarget
public class DefaultOutputStreamOutputTarget extends Object implements OutputStreamOutputTarget
- Since:
- 6.2M1
- Version:
- $Id: 649422255fad3bb48a72599affa2743aacb43671 $
-
-
Constructor Summary
Constructors Constructor Description DefaultOutputStreamOutputTarget(OutputStream outputStream)Create an instance ofOutputStreamOutputTargetreturning the passedOutputStream.DefaultOutputStreamOutputTarget(OutputStream outputStream, boolean close)Create an instance ofOutputStreamOutputTargetreturning the passedOutputStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()OutputStreamgetOutputStream()booleanrestartSupported()StringtoString()
-
-
-
Constructor Detail
-
DefaultOutputStreamOutputTarget
public DefaultOutputStreamOutputTarget(OutputStream outputStream)
Create an instance ofOutputStreamOutputTargetreturning the passedOutputStream.The passed
OutputStreamis not closed when theOutputTargetis closed.- Parameters:
outputStream- theOutputStream
-
DefaultOutputStreamOutputTarget
public DefaultOutputStreamOutputTarget(OutputStream outputStream, boolean close)
Create an instance ofOutputStreamOutputTargetreturning the passedOutputStream.- Parameters:
outputStream- theOutputStreamclose- indicate of the passerOutputStreamshould be closed when theOutputTargetis closed- Since:
- 6.2M1
-
-
Method Detail
-
restartSupported
public boolean restartSupported()
- Specified by:
restartSupportedin interfaceOutputTarget- Returns:
- true if it's possible to close and reset the target to its beginning
-
getOutputStream
public OutputStream getOutputStream()
- Specified by:
getOutputStreamin interfaceOutputStreamOutputTarget
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-