- java.lang.Object
-
- java.io.Writer
-
- com.semanticcms.core.model.NodeBodyWriter
-
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
public class NodeBodyWriter extends Writer
Writes node body content, while replacing nested child element markers with child element content.TODO: Performance: It may be faster to deal with strings and char[] instead of sending everything through as single characters.
-
-
Constructor Summary
Constructors Constructor Description NodeBodyWriter(Node node, Writer out, ElementContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
void
write(char[] cbuf, int off, int len)
void
write(int c)
static void
writeElementMarker(long elementKey, Appendable out)
-
-
-
Constructor Detail
-
NodeBodyWriter
public NodeBodyWriter(Node node, Writer out, ElementContext context)
-
-
Method Detail
-
writeElementMarker
public static void writeElementMarker(long elementKey, Appendable out) throws IOException
- Throws:
IOException
-
write
public void write(int c) throws IOException
- Overrides:
write
in classWriter
- Throws:
IOException
-
write
public void write(char[] cbuf, int off, int len) throws IOException
- Specified by:
write
in classWriter
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-
-