Package org.apache.wiki.htmltowiki

# Class WhitespaceTrimWriter

java.lang.Object
java.io.Writer
org.apache.wiki.htmltowiki.WhitespaceTrimWriter

All Implemented Interfaces:
  `Closeable`, `Flushable`, `Appendable`, `AutoCloseable`

public class WhitespaceTrimWriter extends Writer
Part of the XHtmlToWikiTranslator.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`NO_TRIMMED_SPACE`

### Fields inherited from class java.io.Writer

`lock`

## Constructor Summary

Constructors
Constructor
Description
`WhitespaceTrimWriter()`

## Method Summary

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.
`String`
`toString()`
`void`
`write(char[] arg0, int arg1, int arg2)`

### Methods inherited from class java.io.Writer

`append, append, append, nullWriter, write, write, write, write`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### NO_TRIMMED_SPACE

public static final String NO_TRIMMED_SPACE

See Also:
  - Constant Field Values

## Constructor Details

### WhitespaceTrimWriter

public WhitespaceTrimWriter()

## Method Details

### flush

public void flush()

Specified by:
  `flush` in interface `Flushable`
Specified by:
  `flush` in class `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 IOException

Specified by:
  `write` in class `Writer`
Throws:
  `IOException`

### close

public void close() throws IOException

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in class `Writer`
Throws:
  `IOException`

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### isCurrentlyOnLineBegin

public boolean isCurrentlyOnLineBegin()
Returns true, if the writer is currently writing a line start.

Returns:
  True or false.