public final class StoredFilePathStrategyHashSubFolders extends StoredFilePathStrategy
Store files in a hierarchy of folders using successive decimal digits of the hashcode of the SOP Instance UID as the folder name and the SOP Instance UID as the filename within the most deeply nested folder.
This is the currently preferred strategy for a server that is expected to store a large number of files.
BYSOPINSTANCEUIDCOMPONENTFOLDERS, BYSOPINSTANCEUIDHASHSUBFOLDERS, BYSOPINSTANCEUIDINSINGLEFOLDER, defaultAlternativeSubfolder| Constructor and Description |
|---|
StoredFilePathStrategyHashSubFolders() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] arg)
Perform self test.
|
String |
makeStoredFilePath(String sopInstanceUID)
Generate a path to where to store a file based on its SOP Instance UID.
|
String |
toString() |
getDefaultStrategy, makeAlternativeStoredFilePath, makeReliableStoredFilePathWithFoldersCreated, makeReliableStoredFilePathWithFoldersCreated, makeStoredFilePath, testpublic StoredFilePathStrategyHashSubFolders()
public static void main(String[] arg)
Perform self test. If arguments are given, then use then as test UIDs. If no arguments, then use internal test UIDs.
public String makeStoredFilePath(String sopInstanceUID)
StoredFilePathStrategyGenerate a path to where to store a file based on its SOP Instance UID.
makeStoredFilePath in class StoredFilePathStrategysopInstanceUID - the SOP Instance UID of the instance to be saved