public class CharactersSubDirectoryCreator extends Object implements SubDirectoryCreator
Modifier and Type | Field and Description |
---|---|
static char |
DEFAULT_DIRECTORY_NAME_CHAR
The default character used.
|
Constructor and Description |
---|
CharactersSubDirectoryCreator(int subDirectoriesNameLength)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getDefaultName()
The default subdirectory name if "key" string length is below "subDirectoriesNameLength".
|
int |
getSubDirectoriesNameLength()
The length of the subdirectories created on the basis of the key.
|
File |
getSubDirectory(File directory,
String key)
Construct a sub
|
public static final char DEFAULT_DIRECTORY_NAME_CHAR
public CharactersSubDirectoryCreator(int subDirectoriesNameLength) throws IllegalArgumentException
subDirectoriesNameLength
- the length of the subdirectories create on the basis of the key.IllegalArgumentException
- if subDirectoriesNameLength is less than one.public File getSubDirectory(File directory, String key)
SubDirectoryCreator
getSubDirectory
in interface SubDirectoryCreator
directory
- the base directory which is the default place to store the file value.key
- which is also the filename.File.getName()
,
CachingDirectory.getSubDirectory(String)
public final String getDefaultName()
public final int getSubDirectoriesNameLength()
Copyright © 2016. All rights reserved.