Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| HTML Parser Home Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.htmlparser.lexerapplications.tabby
Class Tabby

    java.lang.Object
      org.htmlparser.lexerapplications.tabby.Tabby

public class Tabby
extends Object

Replace tabs with spaces. Convert tabs to the correct number of spaces according to a tabstop, change DOS \r\n line endings to Unix \n form, and remove trailing whitespace

Field Summary
`protected org.htmlparser.lexerapplications.tabby.Tabby.Filter` | `mFilter` The file filter to apply.
`protected int` | `mTabsize` The replacement tab stop size.

Constructor Summary
`Tabby()` Creates a new instance of Tabby with no file filter and a tab stop of 4.
`Tabby(String filter)` Creates a new instance of Tabby using the given regular expression and a tab stop of 4.
`Tabby(String filter, int tabsize)` Creates a new instance of Tabby.

Method Summary
`protected void` | `edit(File file)` Process the file or directory.
`static void` | `main(String[] args)` Run Tabby on a file or directory.
`protected void` | `process(File file)` Process the file or directory.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### mFilter

    protected org.htmlparser.lexerapplications.tabby.Tabby.Filter mFilter

  The file filter to apply.

### mTabsize

    protected int mTabsize

  The replacement tab stop size.

Constructor Detail

### Tabby

    public Tabby()

  Creates a new instance of Tabby with no file filter and a tab stop of 4.

### Tabby

    public Tabby(String filter)

  Creates a new instance of Tabby using the given regular expression and a tab stop of 4.

Parameters:
  `filter` - The regular expression to apply to the files searched.

### Tabby

    public Tabby(String filter,
                 int tabsize)
          throws IllegalArgumentException

  Creates a new instance of Tabby.

Parameters:
  `filter` - The regular expression to apply to the files searched.
  `tabsize` - The tab stop setting.
Throws:
  `IllegalArgumentException` - If tabsize is not a positive number.

Method Detail

### process

    protected void process(File file)

  Process the file or directory.

  Parameters:
    `file` - The file to process.

### edit

    protected void edit(File file)

  Process the file or directory.

  Parameters:
    `file` - The file to edit.

### main

    public static void main(String[] args)

  Run Tabby on a file or directory.

  Parameters:
    `args` - The command line arguments.

         args[0] The file or directory to work on.
         args[1] Optional, the regular expression to use as a file filter
         args[2] Optional, the tab stop setting (integer).

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| © 2004 Somik Raha Mar 14, 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

HTML Parser is an open source library released under LGPL.