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

## baseCode.util
Class FileTools

    java.lang.Object
      baseCode.util.FileTools

public class FileTools
extends java.lang.Object

Copyright (c) 2004 Columbia University

Version:
  $Id: FileTools.java,v 1.7 2005/03/21 18:01:04 pavlidis Exp $
Author:
  Pavlidis, Will Braynen

Field Summary
`protected static java.lang.String[]` | `DATA_EXTENSIONS`
`static java.lang.String` | `DEFAULT_DATA_EXTENSION`
`static java.lang.String` | `DEFAULT_IMAGE_EXTENSION`
`static java.lang.String` | `DEFAULT_XML_EXTENSION`
`protected static java.lang.String` | `GIF_EXTENSION`
`protected static java.lang.String[]` | `IMAGE_EXTENSIONS`
`protected static java.lang.String` | `PNG_EXTENSION`
`protected static java.lang.String` | `TXT_EXTENSION`
`protected static java.lang.String[]` | `XML_EXTENSIONS`

Constructor Summary
`FileTools()`

Method Summary
`static java.lang.String` | `addDataExtension(java.lang.String filename)`
`static java.lang.String` | `addImageExtension(java.lang.String filename)`
`static java.lang.String` | `changeExtension(java.lang.String filename, java.lang.String newExtension)`
`static void` | `checkPathIsReadableFile(java.lang.String file)`
`static java.lang.String` | `getExtension(java.lang.String filename)` Returns the extension of a file.
`static java.lang.String` | `getWithoutExtension(java.lang.String filename)`
`static boolean` | `hasDataExtension(java.lang.String filename)`
`static boolean` | `hasImageExtension(java.lang.String filename)`
`static boolean` | `hasXMLExtension(java.lang.String filename)`
`static boolean` | `testDir(java.lang.String dirname)`
`static boolean` | `testFile(java.io.File file)`
`static boolean` | `testFile(java.lang.String filename)`

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

Field Detail

### PNG_EXTENSION

    protected static final java.lang.String PNG_EXTENSION

See Also:
  Constant Field Values

### GIF_EXTENSION

    protected static final java.lang.String GIF_EXTENSION

See Also:
  Constant Field Values

### TXT_EXTENSION

    protected static final java.lang.String TXT_EXTENSION

See Also:
  Constant Field Values

### XML_EXTENSIONS

    protected static final java.lang.String[] XML_EXTENSIONS

### IMAGE_EXTENSIONS

    protected static final java.lang.String[] IMAGE_EXTENSIONS

### DATA_EXTENSIONS

    protected static final java.lang.String[] DATA_EXTENSIONS

### DEFAULT_DATA_EXTENSION

    public static final java.lang.String DEFAULT_DATA_EXTENSION

See Also:
  Constant Field Values

### DEFAULT_IMAGE_EXTENSION

    public static final java.lang.String DEFAULT_IMAGE_EXTENSION

See Also:
  Constant Field Values

### DEFAULT_XML_EXTENSION

    public static final java.lang.String DEFAULT_XML_EXTENSION

See Also:
  Constant Field Values

Constructor Detail

### FileTools

    public FileTools()

Method Detail

### checkPathIsReadableFile

    public static void checkPathIsReadableFile(java.lang.String file)
                                        throws java.io.IOException

  Parameters:
    `file` -
  Throws:
    `java.io.IOException`

### getExtension

    public static java.lang.String getExtension(java.lang.String filename)

  Returns the extension of a file.

  Parameters:
    `filename` -
  Returns:
    @return

### getWithoutExtension

    public static java.lang.String getWithoutExtension(java.lang.String filename)

  Parameters:
    `filename` -
  Returns:

### changeExtension

    public static java.lang.String changeExtension(java.lang.String filename,
                                                   java.lang.String newExtension)

  Parameters:
    `filename` -
    `newExtension` -
  Returns:
    the new filename with the changed extension, but does not modify the `filename` parameter.

### hasImageExtension

    public static boolean hasImageExtension(java.lang.String filename)

  Parameters:
    `filename` -
  Returns:

### hasXMLExtension

    public static boolean hasXMLExtension(java.lang.String filename)

  Parameters:
    `filename` -
  Returns:

### hasDataExtension

    public static boolean hasDataExtension(java.lang.String filename)

  Parameters:
    `filename` -
  Returns:

### addImageExtension

    public static java.lang.String addImageExtension(java.lang.String filename)

  Parameters:
    `filename` -
  Returns:
    the new filename with the added extension, but does not modify the `filename` parameter.

### addDataExtension

    public static java.lang.String addDataExtension(java.lang.String filename)

  Parameters:
    `filename` -
  Returns:
    the new filename with the added extension, but does not modify the `filename` parameter.

### testDir

    public static boolean testDir(java.lang.String dirname)

  Parameters:
    `dirname` - directory name
  Returns:

### testFile

    public static boolean testFile(java.lang.String filename)

  Parameters:
    `filename` -
  Returns:

### testFile

    public static boolean testFile(java.io.File file)

  Parameters:
    `file` -
  Returns:

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

Copyright © 2003-2005 Columbia University. All Rights Reserved.