FileTokenizer (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.util, class: FileTokenizer

# Class FileTokenizer

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.util.FileTokenizer

All Implemented Interfaces:
  `Cloneable, Tokenizer`

Direct Known Subclasses:
  `TokenFilter.FileTokenizer`

public class FileTokenizer extends ProjectComponent implements Tokenizer
Class to read the complete input into a string.

Since:
  Ant 1.7

- ## Field Summary

  ### Fields inherited from class ProjectComponent

  `description, location, project`
  Modifier and Type
  Field
  Description
  `protected String`
  `description`
  Deprecated.
  since 1.6.x.
  `protected Location`
  `location`
  Deprecated.
  since 1.6.x.
  `protected Project`
  `project`
  Deprecated.
  since 1.6.x.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FileTokenizer()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getPostToken()`
  Return the intra-token string
  `String`
  `getToken(Reader in)`
  Get the complete input as a string

  ### Methods inherited from class ProjectComponent

  `clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject`
  Modifier and Type
  Method
  Description
  `Object`
  `clone()`
  `String`
  `getDescription()`
  Returns the description of the current action.
  `Location`
  `getLocation()`
  Returns the file/location where this task was defined.
  `Project`
  `getProject()`
  Returns the project to which this component belongs.
  `void`
  `log(String msg)`
  Logs a message with the default (INFO) priority.
  `void`
  `log(String msg, int msgLevel)`
  Logs a message with the given priority.
  `void`
  `setDescription(String desc)`
  Sets a description of the current action.
  `void`
  `setLocation(Location location)`
  Sets the file/location where this task was defined.
  `void`
  `setProject(Project project)`
  Sets the project object of this component.

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### FileTokenizer

    public FileTokenizer()

- ## Method Details

  - ### getToken

    public String getToken(Reader in) throws IOException
    Get the complete input as a string
    Specified by:
      `getToken` in interface `Tokenizer`
    Parameters:
      `in` - the reader object
    Returns:
      the complete input
    Throws:
      `IOException` - if error reading

  - ### getPostToken

    public String getPostToken()
    Return the intra-token string
    Specified by:
      `getPostToken` in interface `Tokenizer`
    Returns:
      an empty string always