net.chaosserver.bilbo.task.generate.joliet
Class JolietFormatter
java.lang.Object
|
+--net.chaosserver.bilbo.task.generate.joliet.JolietFormatter
- All Implemented Interfaces:
- Formatter
- public class JolietFormatter
- extends Object
- implements Formatter
Class used to format a given filename into a Joliet acceptable version.
A Joliet acceptable version is created by truncating the total
filename length, including extension, to be
MAX_FILENAME_LENGTH
characters long.
When a filename is truncated, ~# is placed on the end with the
number incrementing from 1 to 9 for each name collision.
- Since:
- Bilbo 1.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static Logger logger
- Handle the logging object.
MAX_FILENAME_LENGTH
public static final int MAX_FILENAME_LENGTH
- Max length of the filename in Joliet format.
- See Also:
- Constant Field Values
JolietFormatter
public JolietFormatter()
format
public String format(Directory directory,
File file)
throws JolietException
- Generates a valid Joliet filename for the file passed in.
- Specified by:
format
in interface Formatter
- Parameters:
directory
- The directory the file exists in. This is
needed in case of naming conflicts with files already
in the directory.file
- The file to generate a Joliet name for.
- Returns:
- A valid joliet filename for the file
- Throws:
JolietException
- indicates a system exception
Copyright © 20030415