Package com.fasterxml.jackson.core.io
Class OutputDecorator
java.lang.Object
com.fasterxml.jackson.core.io.OutputDecorator
- All Implemented Interfaces:
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract OutputStreamdecorate(IOContext ctxt, OutputStream out) Method called byJsonFactoryinstance when creating generator for givenOutputStream, when this decorator has been registered.abstract WriterMethod called byJsonFactoryinstance when creating generator for givenWriter, when this decorator has been registered.
-
Constructor Details
-
OutputDecorator
public OutputDecorator()
-
-
Method Details
-
decorate
Method called byJsonFactoryinstance 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:
IOException- if construction of decoratedOutputStreamfails
-
decorate
Method called byJsonFactoryinstance 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:
IOException- if construction of decoratedWriterfails
-