Пример #1
0
  /**
   * Resets the Loader object and sets the source of the data set to be the supplied File object.
   *
   * @param dir the source directory.
   * @throws IOException if an error occurs
   */
  public void setSource(File dir) throws IOException {
    reset();

    if (dir == null) {
      throw new IOException("Source directory object is null!");
    }

    m_sourceFile = dir;
    if (!dir.exists() || !dir.isDirectory())
      throw new IOException("Directory '" + dir + "' not found");
  }
Пример #2
0
 /**
  * Sets whether the filename will be stored as an extra attribute.
  *
  * @param value if true the filename will be stored in an extra attribute
  */
 public void setOutputFilename(boolean value) {
   m_OutputFilename = value;
   reset();
 }