com.pixelmed.dicom

## Class StoredFilePathStrategyHashSubFolders

- java.lang.Object
- - com.pixelmed.dicom.StoredFilePathStrategy
  - - com.pixelmed.dicom.StoredFilePathStrategyHashSubFolders

    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.

### Field Summary

### Fields inherited from class com.pixelmed.dicom.StoredFilePathStrategy

`BYSOPINSTANCEUIDCOMPONENTFOLDERS, BYSOPINSTANCEUIDHASHSUBFOLDERS, BYSOPINSTANCEUIDINSINGLEFOLDER, debugLevel, defaultAlternativeSubfolder`

### Constructor Summary

Constructors
Constructor and Description
`StoredFilePathStrategyHashSubFolders()`

### Method Summary

Methods
`static void` `main(java.lang.String[] arg)` Perform self test.
`java.lang.String` `makeStoredFilePath(java.lang.String sopInstanceUID)` Generate a path to where to store a file based on its SOP Instance UID.
`java.lang.String` `toString()`

### Methods inherited from class com.pixelmed.dicom.StoredFilePathStrategy

`getDefaultStrategy, makeAlternativeStoredFilePath, makeReliableStoredFilePathWithFoldersCreated, makeReliableStoredFilePathWithFoldersCreated, makeStoredFilePath, setDebugLevel, test`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### StoredFilePathStrategyHashSubFolders

    public StoredFilePathStrategyHashSubFolders()

### Method Detail

#### makeStoredFilePath

    public java.lang.String makeStoredFilePath(java.lang.String sopInstanceUID)

Description copied from class: `StoredFilePathStrategy`

Generate a path to where to store a file based on its SOP Instance UID.

Overrides:
  `makeStoredFilePath` in class `StoredFilePathStrategy`
Parameters:
  `sopInstanceUID` - the SOP Instance UID of the instance to be saved
Returns:
  the path to the file, which may contain nested sub-folders

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### main

    public static void main(java.lang.String[] arg)

Perform self test. If arguments are given, then use then as test UIDs. If no arguments, then use internal test UIDs.