Class StreamingMarkupWriter
- java.lang.Object
-
- java.io.Writer
-
- groovy.xml.streamingmarkupsupport.StreamingMarkupWriter
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.Appendable
,java.lang.AutoCloseable
public class StreamingMarkupWriter extends java.io.Writer
-
-
Field Summary
Fields Modifier and Type Field Description protected java.nio.charset.CharsetEncoder
encoder
protected java.lang.String
encoding
protected boolean
encodingKnown
protected boolean
haveHighSurrogate
protected java.lang.StringBuilder
surrogatePair
protected java.io.Writer
writer
protected boolean
writingAttribute
-
Constructor Summary
Constructors Constructor Description StreamingMarkupWriter(java.io.Writer writer)
StreamingMarkupWriter(java.io.Writer writer, java.lang.String encoding)
StreamingMarkupWriter(java.io.Writer writer, java.lang.String encoding, boolean useDoubleQuotes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
java.io.Writer
escaped()
void
flush()
java.lang.String
getEncoding()
boolean
getEncodingKnown()
void
setWritingAttribute(boolean writingAttribute)
java.io.Writer
unescaped()
void
write(char[] cbuf, int off, int len)
void
write(int c)
-
-
-
Field Detail
-
writer
protected final java.io.Writer writer
-
encoding
protected final java.lang.String encoding
-
encodingKnown
protected boolean encodingKnown
-
encoder
protected final java.nio.charset.CharsetEncoder encoder
-
writingAttribute
protected boolean writingAttribute
-
haveHighSurrogate
protected boolean haveHighSurrogate
-
surrogatePair
protected java.lang.StringBuilder surrogatePair
-
-
Constructor Detail
-
StreamingMarkupWriter
public StreamingMarkupWriter(java.io.Writer writer, java.lang.String encoding)
-
StreamingMarkupWriter
public StreamingMarkupWriter(java.io.Writer writer, java.lang.String encoding, boolean useDoubleQuotes)
-
StreamingMarkupWriter
public StreamingMarkupWriter(java.io.Writer writer)
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in classjava.io.Writer
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException
- Specified by:
flush
in interfacejava.io.Flushable
- Specified by:
flush
in classjava.io.Writer
- Throws:
java.io.IOException
-
write
public void write(int c) throws java.io.IOException
- Overrides:
write
in classjava.io.Writer
- Throws:
java.io.IOException
-
write
public void write(char[] cbuf, int off, int len) throws java.io.IOException
- Specified by:
write
in classjava.io.Writer
- Throws:
java.io.IOException
-
setWritingAttribute
public void setWritingAttribute(boolean writingAttribute)
-
escaped
public java.io.Writer escaped()
-
unescaped
public java.io.Writer unescaped()
-
getEncoding
public java.lang.String getEncoding()
-
getEncodingKnown
public boolean getEncodingKnown()
-
-