Package org.apache.wiki.htmltowiki
Class WhitespaceTrimWriter
- java.lang.Object
-
- java.io.Writer
-
- org.apache.wiki.htmltowiki.WhitespaceTrimWriter
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.Appendable
,java.lang.AutoCloseable
public class WhitespaceTrimWriter extends java.io.Writer
Part of the XHtmlToWikiTranslator.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NO_TRIMMED_SPACE
-
Constructor Summary
Constructors Constructor Description WhitespaceTrimWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
boolean
isCurrentlyOnLineBegin()
Returns true, if the writer is currently writing a line start.boolean
isWhitespaceTrimMode()
Returns true, if this Writer is currently trimming any whitespaces.void
setWhitespaceTrimMode(boolean trimMode)
Set the trimming mode on/off.java.lang.String
toString()
void
write(char[] arg0, int arg1, int arg2)
-
-
-
Field Detail
-
NO_TRIMMED_SPACE
public static final java.lang.String NO_TRIMMED_SPACE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WhitespaceTrimWriter
public WhitespaceTrimWriter()
-
-
Method Detail
-
flush
public void flush()
- Specified by:
flush
in interfacejava.io.Flushable
- Specified by:
flush
in classjava.io.Writer
-
isWhitespaceTrimMode
public boolean isWhitespaceTrimMode()
Returns true, if this Writer is currently trimming any whitespaces.- Returns:
- True, if trimming.
-
setWhitespaceTrimMode
public void setWhitespaceTrimMode(boolean trimMode)
Set the trimming mode on/off.- Parameters:
trimMode
- True, if you want trimming to be turned on. False otherwise.
-
write
public void write(char[] arg0, int arg1, int arg2) throws java.io.IOException
- Specified by:
write
in classjava.io.Writer
- Throws:
java.io.IOException
-
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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isCurrentlyOnLineBegin
public boolean isCurrentlyOnLineBegin()
Returns true, if the writer is currently writing a line start.- Returns:
- True or false.
-
-