| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv static final String | |
| pack-priv File | |
| pack-priv File | |
| pack-priv String | |
| pack-priv int | |
| pack-priv int | |
| pack-priv PrintWriter | |
| pack-priv Properties | |
| pack-priv String | |
| pack-priv BufferedReader | |
| pack-priv String | |
| pack-priv File | |
| pack-priv boolean | |
| protected static final String | |
| pack-priv String[] | |
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected String | |
| public void | binaryCopy(File
The file to copy inFile, File The destination file outFile)Do a binary copy of the file byte buffer by byte buffer. |
| protected boolean | |
| public File | Returns: The destination directory File objectThe path to the directory File object to create aDirString)INTERNAL Creates a destination directory File object under the path passed, verifying correctness. |
| public File | |
| public PrintWriter | |
| protected void | |
| public void | createDestinationDirectory(File
The output directory to create aDirectory)This method creates an output directory for post-rename file(s). |
| public static boolean | Returns: TRUE if directory2 is a subdirectory of directory1The higher level directory directory1, File The lower level directory directory2)Return true if directory2 is contained within directory1. |
| public File | |
| public static String | |
| public synchronized BufferedReader | |
| public boolean | Returns: TRUE if the extension is supportedThe file extension to check for being supported extension)Return true if the PackageRenamer should work on the given file extension. |
| public void | |
| public static void | |
| public String | Returns: The file extension or an empty string if none was found.The file of which to retrieve the extension aFile)Returns the extension of the given file. |
| protected File | Returns: The destination directory File objectINTERNAL Prompt from System.in for an empty or non-existent directory to use as the destination directory. |
| public Properties | Returns: The Properties object containing the renaming informationThe input file to use for the renaming filename)This readChangesFile() method reads the given properties file to be a reference for renaming TopLink package name. |
| public static String | |
| public String | Returns: The new filename, regardless of whether is has been changedThe original filename aSourceFileNameWithoutRoot)Renames a file based on the properties passed. |
| public void | run()
This run() method performs, reading the properties file into properties variable to be a reference for changing package name. |
| public void | runSearchAndReplacePackageName(File
The source file to process sourceFile)This runSearchAndReplacePackageName() reads a pre-rename source file all into string variable and replacing the old package names with the new ones according to the properties file. |
| protected PrintWriter | |
| public void | traverseSourceDirectory(File
The source root directory to traverse aDirectoryString)This traverseSourceDirectory() traverse source-root-directory, creating an corresponding output directory, and calling another method for replacing old TopLink package name. |
| public static void |
| BUFSIZ | back to summary |
|---|---|
| pack-priv int BUFSIZ | |
| CR | back to summary |
|---|---|
| pack-priv static final String CR | |
| destinationRootDir | back to summary |
|---|---|
| pack-priv File destinationRootDir | |
| logFile | back to summary |
|---|---|
| pack-priv File logFile | |
| logFileString | back to summary |
|---|---|
| pack-priv String logFileString | |
| numberOfChangedFile | back to summary |
|---|---|
| pack-priv int numberOfChangedFile | |
| numberOfTotalFile | back to summary |
|---|---|
| pack-priv int numberOfTotalFile | |
| outLog | back to summary |
|---|---|
| pack-priv PrintWriter outLog | |
| properties | back to summary |
|---|---|
| pack-priv Properties properties | |
| propertiesFileName | back to summary |
|---|---|
| pack-priv String propertiesFileName | |
| reader | back to summary |
|---|---|
| pack-priv BufferedReader reader | |
| sourceProperties | back to summary |
|---|---|
| pack-priv String sourceProperties | |
| sourceRootDirFile | back to summary |
|---|---|
| pack-priv File sourceRootDirFile | |
| specifyLogFile | back to summary |
|---|---|
| pack-priv boolean specifyLogFile | |
| SYSTEM_OUT | back to summary |
|---|---|
| protected static final String SYSTEM_OUT | |
| UNSUPPORTED_EXTENSIONS | back to summary |
|---|---|
| pack-priv String[] UNSUPPORTED_EXTENSIONS | |
| VERBOSE | back to summary |
|---|---|
| pack-priv boolean VERBOSE | |
| PackageRenamer | back to summary |
|---|---|
| public PackageRenamer() The constructor of a PackageRenamer class. | |
| PackageRenamer | back to summary |
|---|---|
| public PackageRenamer(String propertiesFileName) | |
| PackageRenamer | back to summary |
|---|---|
| public PackageRenamer(String[] args) | |
| bannerText | back to summary |
|---|---|
| protected String bannerText() | |
| binaryCopy | back to summary |
|---|---|
| public void binaryCopy(File inFile, File outFile) throws FileNotFoundException, IOException Do a binary copy of the file byte buffer by byte buffer.
| |
| bufferContainsNullChar | back to summary |
|---|---|
| protected boolean bufferContainsNullChar(byte[] buffer, int bufferLength) | |
| buildAndCheckDestinationFile | back to summary |
|---|---|
| public File buildAndCheckDestinationFile(String aDirString) INTERNAL Creates a destination directory File object under the path passed, verifying correctness. | |
| buildAndCheckExistingDirFile | back to summary |
|---|---|
| public File buildAndCheckExistingDirFile(String aDirString) | |
| buildAndCheckLogWriter | back to summary |
|---|---|
| public PrintWriter buildAndCheckLogWriter(String logFileString) | |
| cleanup | back to summary |
|---|---|
| protected void cleanup() | |
| createDestinationDirectory | back to summary |
|---|---|
| public void createDestinationDirectory(File aDirectory) This method creates an output directory for post-rename file(s).
| |
| directoryIsSubdirectory | back to summary |
|---|---|
| public static boolean directoryIsSubdirectory(File directory1, File directory2) Return true if directory2 is contained within directory1. Both directories must be absolute. | |
| existingDirectoryFromPrompt | back to summary |
|---|---|
| public File existingDirectoryFromPrompt() | |
| getDefaultPropertiesFileName | back to summary |
|---|---|
| public static String getDefaultPropertiesFileName() | |
| getReader | back to summary |
|---|---|
| public synchronized BufferedReader getReader() | |
| isExtensionSupported | back to summary |
|---|---|
| public boolean isExtensionSupported(String extension) Return true if the PackageRenamer should work on the given file extension.
| |
| logln | back to summary |
|---|---|
public void logln(String str)
| |
| main | back to summary |
|---|---|
| public static void main(String[] args) Main method to run the PackageRenamer
| |
| parseFileExtension | back to summary |
|---|---|
| public String parseFileExtension(File aFile) Returns the extension of the given file. | |
| promptForDestinationDirectory | back to summary |
|---|---|
| protected File promptForDestinationDirectory() INTERNAL Prompt from System.in for an empty or non-existent directory to use as the destination directory.
| |
| readChangesFile | back to summary |
|---|---|
| public Properties readChangesFile(String filename) This readChangesFile() method reads the given properties file to be a reference for renaming TopLink package name.
| |
| replace | back to summary |
|---|---|
| public static String replace(String str, String oldChars, String newChars) Do a search and replace in a string. | |
| returnNewFileNameIfRequired | back to summary |
|---|---|
| public String returnNewFileNameIfRequired(String aSourceFileNameWithoutRoot) Renames a file based on the properties passed. | |
| run | back to summary |
|---|---|
| public void run() This run() method performs, reading the properties file into properties variable to be a reference for changing package name. creating an destination-root-direetory. and, calling traverseSourceDirectory() method. | |
| runSearchAndReplacePackageName | back to summary |
|---|---|
| public void runSearchAndReplacePackageName(File sourceFile) This runSearchAndReplacePackageName() reads a pre-rename source file all into string variable and replacing the old package names with the new ones according to the properties file.
| |
| streamForNonExistentFilePrompt | back to summary |
|---|---|
| protected PrintWriter streamForNonExistentFilePrompt() | |
| traverseSourceDirectory | back to summary |
|---|---|
| public void traverseSourceDirectory(File aDirectoryString) This traverseSourceDirectory() traverse source-root-directory, creating an corresponding output directory, and calling another method for replacing old TopLink package name.
| |
| usage | back to summary |
|---|---|
| public static void usage() | |
| Access | Constructor and Description |
|---|---|
| public |
| PackageRenamerException | back to summary |
|---|---|
| public PackageRenamerException(String aMessage) | |