Package org.grails.buffer
Class CodecPrintWriter
- java.lang.Object
-
- java.io.Writer
-
- org.grails.buffer.GrailsPrintWriter
-
- org.grails.buffer.CodecPrintWriter
-
- All Implemented Interfaces:
groovy.lang.GroovyObject,java.io.Closeable,java.io.Flushable,java.lang.Appendable,java.lang.AutoCloseable,GrailsWrappedWriter,EncodedAppenderFactory,EncodedAppenderWriterFactory,EncoderAware
public class CodecPrintWriter extends GrailsPrintWriter implements EncoderAware, EncodedAppenderFactory
-
-
Field Summary
-
Fields inherited from class org.grails.buffer.GrailsPrintWriter
allowUnwrappingOut, CRLF, LOG, out, previousOut, streamCharBufferTarget, trouble, usageFlag
-
-
Constructor Summary
Constructors Constructor Description CodecPrintWriter(java.io.Writer out, Encoder encoder, EncodingStateRegistry encodingStateRegistry)CodecPrintWriter(java.io.Writer out, Encoder encoder, EncodingStateRegistry encodingStateRegistry, boolean ignoreEncodingState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EncodedAppendergetEncodedAppender()Gets the EncodedAppender that is connected to the instance of this implementation.EncodergetEncoder()Gets the current encoder in use.java.io.WritergetWriterForEncoder(Encoder encoder, EncodingStateRegistry encodingStateRegistry)Gets the EncodedAppenderWriter instance that is connected to this instance implementation with a certain encoder fixed.-
Methods inherited from class org.grails.buffer.GrailsPrintWriter
append, append, append, append, append, appendNullCharSequence, asPrintWriter, asType, checkError, clone, close, findStreamCharBufferTarget, flush, getMetaClass, getOut, getProperty, invokeMethod, isAllowUnwrappingOut, isDestinationActivated, isUsed, leftShift, leftShift, leftShift, leftShift, leftShift, markUsed, plus, print, print, print, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, println, resetUsed, setError, setMetaClass, setOut, setProperty, setUsed, unwrap, unwrapWriter, write, write, write, write, write, write, write, writeWritable
-
-
-
-
Constructor Detail
-
CodecPrintWriter
public CodecPrintWriter(java.io.Writer out, Encoder encoder, EncodingStateRegistry encodingStateRegistry)
-
CodecPrintWriter
public CodecPrintWriter(java.io.Writer out, Encoder encoder, EncodingStateRegistry encodingStateRegistry, boolean ignoreEncodingState)
-
-
Method Detail
-
getEncoder
public Encoder getEncoder()
Description copied from interface:EncoderAwareGets the current encoder in use.- Specified by:
getEncoderin interfaceEncoderAware- Returns:
- the encoder
-
getEncodedAppender
public EncodedAppender getEncodedAppender()
Description copied from interface:EncodedAppenderFactoryGets the EncodedAppender that is connected to the instance of this implementation.- Specified by:
getEncodedAppenderin interfaceEncodedAppenderFactory- Returns:
- the EncodedAppender
-
getWriterForEncoder
public java.io.Writer getWriterForEncoder(Encoder encoder, EncodingStateRegistry encodingStateRegistry)
Description copied from interface:EncodedAppenderWriterFactoryGets the EncodedAppenderWriter instance that is connected to this instance implementation with a certain encoder fixed.- Specified by:
getWriterForEncoderin interfaceEncodedAppenderWriterFactory- Overrides:
getWriterForEncoderin classGrailsPrintWriter- Parameters:
encoder- the encoder to useencodingStateRegistry- the current EncodingStateRegistry to use- Returns:
- the java.io.Writer instance
-
-