Interface IStreamableFileService

All Known Subinterfaces:
IFLVService
All Known Implementing Classes:
BaseStreamableFileService, FLVService

public interface IStreamableFileService
Provides access to files that can be streamed.
  • Method Details

    • setPrefix

      void setPrefix(String prefix)
      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

      void setExtension(String extension)
      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

      String prepareFilename(String name)
      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

      boolean canHandle(File file)
      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

      IStreamableFile getStreamableFile(File file) throws IOException
      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