org.red5.io
public abstract class BaseStreamableFileService extends Object implements IStreamableFileService
Constructor and Description |
---|
BaseStreamableFileService() |
Modifier and Type | Method and Description |
---|---|
boolean |
canHandle(File file)
Check whether file can be used by file service, that is, it does exist and have valid extension
|
abstract String |
getExtension()
Getter for extension of file
|
abstract String |
getPrefix()
Getter for prefix.
|
abstract IStreamableFile |
getStreamableFile(File file)
Return streamable file reference.
|
String |
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 |
setPrefix(String prefix)
Sets the prefix.
|
public void setPrefix(String prefix)
setPrefix
in interface IStreamableFileService
public abstract String getPrefix()
getPrefix
in interface IStreamableFileService
public void setExtension(String extension)
setExtension
in interface IStreamableFileService
public abstract String getExtension()
getExtension
in interface IStreamableFileService
public String prepareFilename(String name)
prepareFilename
in interface IStreamableFileService
name
- String to formatpublic boolean canHandle(File file)
canHandle
in interface IStreamableFileService
file
- File objecttrue
if file exist and has valid extension,
false
otherwisepublic abstract IStreamableFile getStreamableFile(File file) throws IOException
getStreamableFile
in interface IStreamableFileService
file
- File resourceIOException
- Thrown if there were problems accessing given fileCopyright © 2006-2012 The Red5 Project