<tabstospaces tablength="8"/>Or:
<filterreader classname="org.apache.tools.ant.filters.TabsToSpaces"> <param name="tablength" value="8"/> </filterreader>
| Modifier and Type | Field and Description |
|---|---|
| private static final int | DEFAULT_TAB_LENGTH
The default tab length. |
| private int | spacesRemaining
The number of spaces still to be read to represent the last-read tab. |
| private static final String | TAB_LENGTH_KEY
Parameter name for the length of a tab. |
| private int | tabLength
Tab length in this filter. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | TabsToSpaces(final Reader
A Reader object providing the underlying stream.
Must not be in)null.Creates a new filtered reader. |
| Modifier and Type | Method and Description |
|---|---|
| public Reader | Returns: a new filter based on this configuration, but filtering the specified readerA Reader object providing the underlying stream.
Must not be rdr)null.Implements org. |
| private int | |
| private void | |
| public int | Returns: the next character in the resulting stream, or -1 if the end of the resulting stream has been reachedOverrides java. |
| public void | setTablength(final int
the number of spaces to be used when converting a tab. tabLength)Sets the tab length. |
| DEFAULT_TAB_LENGTH | back to summary |
|---|---|
| private static final int DEFAULT_TAB_LENGTH The default tab length. | |
| spacesRemaining | back to summary |
|---|---|
| private int spacesRemaining The number of spaces still to be read to represent the last-read tab. | |
| TAB_LENGTH_KEY | back to summary |
|---|---|
| private static final String TAB_LENGTH_KEY Parameter name for the length of a tab. | |
| tabLength | back to summary |
|---|---|
| private int tabLength Tab length in this filter. | |
| TabsToSpaces | back to summary |
|---|---|
| public TabsToSpaces() Constructor for "dummy" instances.
| |
| TabsToSpaces | back to summary |
|---|---|
| public TabsToSpaces(final Reader in) Creates a new filtered reader.
| |
| chain | back to summary |
|---|---|
| public Reader chain(final Reader rdr) Implements org. Creates a new TabsToSpaces using the passed in Reader for instantiation. | |
| getTablength | back to summary |
|---|---|
| private int getTablength() Returns the tab length.
| |
| initialize | back to summary |
|---|---|
| private void initialize() Parses the parameters to set the tab length. | |
| read | back to summary |
|---|---|
| public int read() throws IOException Overrides java. Returns the next character in the filtered stream, converting tabs to the specified number of spaces.
| |
| setTablength | back to summary |
|---|---|
| public void setTablength(final int tabLength) Sets the tab length.
| |