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 inherited from class java.io.Writer
lock -
Constructor Summary
Constructors Constructor Description WhitespaceTrimWriter() -
Method Summary
Modifier and Type Method Description voidclose()voidflush()booleanisCurrentlyOnLineBegin()Returns true, if the writer is currently writing a line start.booleanisWhitespaceTrimMode()Returns true, if this Writer is currently trimming any whitespaces.voidsetWhitespaceTrimMode(boolean trimMode)Set the trimming mode on/off.java.lang.StringtoString()voidwrite(char[] arg0, int arg1, int arg2)Methods inherited from class java.io.Writer
append, append, append, nullWriter, write, write, write, writeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
WhitespaceTrimWriter
public WhitespaceTrimWriter()
-
-
Method Details
-
flush
- Specified by:
flushin interfacejava.io.Flushable- Specified by:
flushin classjava.io.Writer
-
isWhitespaceTrimMode
Returns true, if this Writer is currently trimming any whitespaces.- Returns:
- True, if trimming.
-
setWhitespaceTrimMode
Set the trimming mode on/off.- Parameters:
trimMode- True, if you want trimming to be turned on. False otherwise.
-
write
- Specified by:
writein classjava.io.Writer- Throws:
java.io.IOException
-
close
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein classjava.io.Writer- Throws:
java.io.IOException
-
toString
- Overrides:
toStringin classjava.lang.Object
-
isCurrentlyOnLineBegin
Returns true, if the writer is currently writing a line start.- Returns:
- True or false.
-