InputStream

Abstract class for custom file input streams.

This class allows users to define their own file input sources from which SFML can load resources.

SFML resource classes like sf::Texture and sf::SoundBuffer provide loadFromFile and loadFromMemory functions, which read data from conventional sources. However, if you have data coming from a different source (over a network, embedded, encrypted, compressed, etc) you can derive your own class from sf::InputStream and load SFML resources with their loadFromStream function.

Members

Functions

getSize
long getSize()

Return the size of the stream.

read
long read(void[] data)

Read data from the stream.

seek
long seek(long position)

Change the current reading position.

tell
long tell()

Get the current reading position in the stream.

Meta