Class FileExtensionFilenameGenerator
java.lang.Object
org.codice.alliance.video.stream.mpegts.filename.FileExtensionFilenameGenerator
- All Implemented Interfaces:
FilenameGenerator
Ensures that a filename always ends with a specific extension. If the filename does not end with
the specified extension, then it adds it to the filename. Does not attempt to rewrite an existing
extension. The test is case-insensitive.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringdoGenerateFilename(String baseFilename) final StringgenerateFilename(String baseFilename) toString()
-
Constructor Details
-
FileExtensionFilenameGenerator
-
-
Method Details
-
doGenerateFilename
- Parameters:
baseFilename- guaranteed to be non-null- Returns:
- the transformed filename
-
toString
-
generateFilename
- Specified by:
generateFilenamein interfaceFilenameGenerator- Parameters:
baseFilename- the base filename or template, must be non-null- Returns:
- a non-null value
-