org.gcube.portlets.user.homelibrary.util
Class FileSystemNameUtil

java.lang.Object
  extended by org.gcube.portlets.user.homelibrary.util.FileSystemNameUtil

public class FileSystemNameUtil
extends Object

Author:
Federico De Faveri defaveri@isti.cnr.it

Field Summary
static char DEFAULT_REPLACE_CHAR
          The default used replace char.
static char[] FILE_NAME_ILLEGAL_CHARACTERS
          A list of illegal chars.
static String[] INVALID_FILE_NAME
          A list of invalid file names.
static String REPLACE_NAME
          A replace string for names.
static String[] WINDOWS_INVALID_FILE_NAME
          A list of invalid files names on windows O.S.
 
Constructor Summary
FileSystemNameUtil()
           
 
Method Summary
static String cleanFileName(String name)
          Clean the specified file name.
protected static String removeInvalidChars(String name)
           
protected static String replaceInvalidName(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_NAME_ILLEGAL_CHARACTERS

public static final char[] FILE_NAME_ILLEGAL_CHARACTERS
A list of illegal chars.


DEFAULT_REPLACE_CHAR

public static final char DEFAULT_REPLACE_CHAR
The default used replace char.

See Also:
Constant Field Values

INVALID_FILE_NAME

public static final String[] INVALID_FILE_NAME
A list of invalid file names.


WINDOWS_INVALID_FILE_NAME

public static final String[] WINDOWS_INVALID_FILE_NAME
A list of invalid files names on windows O.S.


REPLACE_NAME

public static final String REPLACE_NAME
A replace string for names.

See Also:
Constant Field Values
Constructor Detail

FileSystemNameUtil

public FileSystemNameUtil()
Method Detail

cleanFileName

public static String cleanFileName(String name)
Clean the specified file name.

Parameters:
name - the name to clean.
Returns:
a cleaned name.

removeInvalidChars

protected static String removeInvalidChars(String name)

replaceInvalidName

protected static String replaceInvalidName(String name)


Copyright © 2013. All Rights Reserved.