Package org.red5.server.api.service
Interface IStreamableFileService
- All Known Subinterfaces:
IFLVService
- All Known Implementing Classes:
BaseStreamableFileService
,FLVService
public interface IStreamableFileService
Provides access to files that can be streamed.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check whether file can be used by file service, that is, it does exist and have valid extensionGetter for extension of fileGetter for prefix.getStreamableFile
(File file) Return streamable file reference.prepareFilename
(String name) Prepair given string to conform filename requirements, for example, add extension to the end if missing.void
setExtension
(String extension) Sets the file extensions serviced.void
Sets the prefix.
-
Method Details
-
setPrefix
Sets the prefix.- Parameters:
prefix
- prefix
-
getPrefix
String getPrefix()Getter for prefix. Prefix is used in filename composition to fetch real file name.- Returns:
- prefix
-
setExtension
Sets the file extensions serviced. If there are more than one, they are separated by commas.- Parameters:
extension
- extension
-
getExtension
String getExtension()Getter for extension of file- Returns:
- File extension that is used
-
prepareFilename
Prepair given string to conform filename requirements, for example, add extension to the end if missing.- Parameters:
name
- String to format- Returns:
- Correct filename
-
canHandle
Check whether file can be used by file service, that is, it does exist and have valid extension- Parameters:
file
- File object- Returns:
- true if file exist and has valid extension, false otherwise
-
getStreamableFile
Return streamable file reference. For FLV files returned streamable file already has generated metadata injected.- Parameters:
file
- File resource- Returns:
- Streamable file resource
- Throws:
IOException
- Thrown if there were problems accessing given file
-