Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.red5.io
Interface IStreamableFileService

All Known Subinterfaces:
  IFLVService, IM4AService, IMP3Service, IMP4Service

All Known Implementing Classes:
  BaseStreamableFileService, FLVService, M4AService, MP3Service, MP4Service

    public interface IStreamableFileService

Provides access to files that can be streamed.

Method Summary
`boolean` | `canHandle(File file)` Check whether file can be used by file service, that is, it does exist and have valid extension
`String` | `getExtension()` Getter for extension of file
`String` | `getPrefix()` Getter for prefix.
`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.

Method Detail

### setPrefix

    void setPrefix(String prefix)

  Sets the prefix.

  Parameters:
    `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` -

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2010 The Red5 Project