FormatUtil (Apache OpenNLP :: Core :: Formats 3.0.0-M4 API)
Description: declaration: package: opennlp.tools.formats, class: FormatUtil

Package opennlp.tools.formats

# Class FormatUtil

java.lang.Object
opennlp.tools.formats.FormatUtil

@Internal public class FormatUtil extends Object
Utility class for the OpenNLP formats package.

Note: Do not use this class, internal use only!

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FormatUtil()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `checkInputFile(String name, File inFile)`
  Check that the given input file is valid.
  `static opennlp.tools.util.InputStreamFactory`
  `createInputStreamFactory(File file)`

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

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

- ## Constructor Details

  - ### FormatUtil

    public FormatUtil()

- ## Method Details

  - ### createInputStreamFactory

    public static opennlp.tools.util.InputStreamFactory createInputStreamFactory(File file)

  - ### checkInputFile

    public static void checkInputFile(String name, File inFile)
    Check that the given input file is valid.

    To pass the test it must:
    - exist
    - not be a directory,
    - and be accessibly.

    Parameters:
      `name` - the name which is used to refer to the file in an error message, it should start with a capital letter.
      `inFile` - the particular `File` to check to qualify an input file
    Throws:
      `opennlp.tools.cmdline.TerminateToolException` - if test does not pass this exception is thrown and an error message is printed to the console.