Package org.grails.buffer
Class StreamCharBuffer.StreamCharBufferWriter
java.lang.Object
java.io.Writer
org.grails.buffer.StreamCharBuffer.StreamCharBufferWriter
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable,EncodedAppenderFactory,EncodedAppenderWriterFactory
- Enclosing class:
- StreamCharBuffer
public final class StreamCharBuffer.StreamCharBufferWriter
extends Writer
implements EncodedAppenderFactory, EncodedAppenderWriterFactory
This is the java.io.Writer implementation for StreamCharBuffer
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Writerappend(CharSequence csq) final Writerappend(CharSequence csq, int start, int end) voidappend(EncodingState encodingState, char character) protected voidappendCharSequence(EncodingState encodingState, CharSequence csq, int start, int end) voidclose()voidflush()final StreamCharBufferGets the EncodedAppender that is connected to the instance of this implementation.getWriterForEncoder(Encoder encoder, EncodingStateRegistry encodingStateRegistry) Gets the EncodedAppenderWriter instance that is connected to this instance implementation with a certain encoder fixed.booleanisClosed()booleanisUsed()final voidmarkUsed()intfinal voidwrite(char[] b, int off, int len) voidwrite(int b) final voidfinal voidfinal voidwrite(StreamCharBuffer subBuffer) final voidwrite(StreamCharBuffer subBuffer, List<Encoder> encoders) Methods inherited from class java.io.Writer
append, nullWriter, write
-
Constructor Details
-
StreamCharBufferWriter
public StreamCharBufferWriter()
-
-
Method Details
-
write
- Specified by:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Overrides:
writein classWriter- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
appendCharSequence
protected void appendCharSequence(EncodingState encodingState, CharSequence csq, int start, int end) throws IOException - Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
isClosed
public boolean isClosed() -
isUsed
public boolean isUsed() -
markUsed
public final void markUsed() -
resetUsed
public int resetUsed() -
write
- Overrides:
writein classWriter- Throws:
IOException
-
getBuffer
-
append
- Throws:
IOException
-
getWriterForEncoder
Description copied from interface:EncodedAppenderWriterFactoryGets the EncodedAppenderWriter instance that is connected to this instance implementation with a certain encoder fixed.- Specified by:
getWriterForEncoderin interfaceEncodedAppenderWriterFactory- Parameters:
encoder- the encoder to useencodingStateRegistry- the current EncodingStateRegistry to use- Returns:
- the java.io.Writer instance
-
getEncodedAppender
Description copied from interface:EncodedAppenderFactoryGets the EncodedAppender that is connected to the instance of this implementation.- Specified by:
getEncodedAppenderin interfaceEncodedAppenderFactory- Returns:
- the EncodedAppender
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-