org.red5.server.stream

## Class FileStreamSource

- java.lang.Object
- - org.red5.server.stream.FileStreamSource

All Implemented Interfaces:
  Constants, ISeekableStreamSource, IStreamSource

    public class FileStreamSource
    extends Object
    implements ISeekableStreamSource, Constants

Represents stream source that is file

### Field Summary

Fields
`protected static org.slf4j.Logger` `log` Logger

### Fields inherited from interface org.red5.server.net.rtmp.message.Constants

`HANDSHAKE_SIZE, HEADER_CONTINUE, HEADER_NEW, HEADER_SAME_SOURCE, HEADER_TIMER_CHANGE, MEDIUM_INT_MAX, SO_CLIENT_CLEAR_DATA, SO_CLIENT_DELETE_DATA, SO_CLIENT_INITIAL_DATA, SO_CLIENT_SEND_MESSAGE, SO_CLIENT_STATUS, SO_CLIENT_UPDATE_ATTRIBUTE, SO_CLIENT_UPDATE_DATA, SO_CONNECT, SO_DELETE_ATTRIBUTE, SO_DISCONNECT, SO_SEND_MESSAGE, SO_SET_ATTRIBUTE, SOURCE_TYPE_LIVE, SOURCE_TYPE_VOD, TYPE_ABORT, TYPE_AGGREGATE, TYPE_AUDIO_DATA, TYPE_BYTES_READ, TYPE_CHUNK_SIZE, TYPE_CLIENT_BANDWIDTH, TYPE_EDGE_ORIGIN, TYPE_FLEX_MESSAGE, TYPE_FLEX_SHARED_OBJECT, TYPE_FLEX_STREAM_SEND, TYPE_INVOKE, TYPE_NOTIFY, TYPE_PING, TYPE_SERVER_BANDWIDTH, TYPE_SHARED_OBJECT, TYPE_STREAM_METADATA, TYPE_VIDEO_DATA`

### Constructor Summary

Constructors
Constructor and Description
`FileStreamSource(ITagReader reader)` Creates file stream source with tag reader

### Method Summary

Methods
`void` `close()` Closes tag reader
`IRTMPEvent` `dequeue()` Get tag from queue and convert to message
`boolean` `hasMore()` Is there something more to stream?
`int` `seek(int ts)` Seek the stream source to timestamp ts (in milliseconds).

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### log

    protected static org.slf4j.Logger log

Logger

### Constructor Detail

#### FileStreamSource

    public FileStreamSource(ITagReader reader)

Creates file stream source with tag reader

Parameters:
  `reader` - Tag reader

### Method Detail

#### close

    public void close()

Closes tag reader

Specified by:
  `close` in interface `IStreamSource`

#### dequeue

    public IRTMPEvent dequeue()

Get tag from queue and convert to message

Specified by:
  `dequeue` in interface `IStreamSource`
Returns:
  RTMP event

#### hasMore

    public boolean hasMore()

Is there something more to stream?

Specified by:
  `hasMore` in interface `IStreamSource`
Returns:
  `true` if there's streamable data, `false` otherwise

#### seek

    public int seek(int ts)

Seek the stream source to timestamp ts (in milliseconds).

Specified by:
  `seek` in interface `ISeekableStreamSource`
Parameters:
  `ts` - Timestamp to seek to
Returns:
  Actual timestamp seeked to