Package com.fasterxml.jackson.core.io
Class OutputDecorator
- java.lang.Object
-
- com.fasterxml.jackson.core.io.OutputDecorator
-
- All Implemented Interfaces:
java.io.Serializable
public abstract class OutputDecorator extends java.lang.Object implements java.io.Serializable
Handler class that can be used to decorate output destinations. Typical use is to use a filter abstraction (filtered output stream, writer) around original output destination, and apply additional processing during write operations.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OutputDecorator()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract java.io.OutputStream
decorate(IOContext ctxt, java.io.OutputStream out)
Method called byJsonFactory
instance when creating generator for givenOutputStream
, when this decorator has been registered.abstract java.io.Writer
decorate(IOContext ctxt, java.io.Writer w)
Method called byJsonFactory
instance when creating generator for givenWriter
, when this decorator has been registered.
-
-
-
Method Detail
-
decorate
public abstract java.io.OutputStream decorate(IOContext ctxt, java.io.OutputStream out) throws java.io.IOException
Method called byJsonFactory
instance when creating generator for givenOutputStream
, when this decorator has been registered.- Parameters:
ctxt
- IO context in use (provides access to declared encoding)out
- Original output destination- Returns:
- OutputStream to use; either passed in argument, or something that calls it
- Throws:
java.io.IOException
- if construction of decoratedOutputStream
fails
-
decorate
public abstract java.io.Writer decorate(IOContext ctxt, java.io.Writer w) throws java.io.IOException
Method called byJsonFactory
instance when creating generator for givenWriter
, when this decorator has been registered.- Parameters:
ctxt
- IO context in use (provides access to declared encoding)w
- Original output writer- Returns:
- Writer to use; either passed in argument, or something that calls it
- Throws:
java.io.IOException
- if construction of decoratedWriter
fails
-
-