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 ofOutputStreamOutputTarget
returning the passedOutputStream
.DefaultOutputStreamOutputTarget(OutputStream outputStream, boolean close)
Create an instance ofOutputStreamOutputTarget
returning the passedOutputStream
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
OutputStream
getOutputStream()
boolean
restartSupported()
String
toString()
-
-
-
Constructor Detail
-
DefaultOutputStreamOutputTarget
public DefaultOutputStreamOutputTarget(OutputStream outputStream)
Create an instance ofOutputStreamOutputTarget
returning the passedOutputStream
.The passed
OutputStream
is not closed when theOutputTarget
is closed.- Parameters:
outputStream
- theOutputStream
-
DefaultOutputStreamOutputTarget
public DefaultOutputStreamOutputTarget(OutputStream outputStream, boolean close)
Create an instance ofOutputStreamOutputTarget
returning the passedOutputStream
.- Parameters:
outputStream
- theOutputStream
close
- indicate of the passerOutputStream
should be closed when theOutputTarget
is closed- Since:
- 6.2M1
-
-
Method Detail
-
restartSupported
public boolean restartSupported()
- Specified by:
restartSupported
in interfaceOutputTarget
- Returns:
- true if it's possible to close and reset the target to its beginning
-
getOutputStream
public OutputStream getOutputStream()
- Specified by:
getOutputStream
in interfaceOutputStreamOutputTarget
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-