Returns the current position of the stream measured in bytes **/.
void
seekAbsolute (off_t absoluteOffset)
Sets the current position of the stream to byte
absoluteOffset
. A negative offset is relative to the end of the file.
void
seekRelative (off_t relativeOffset)
Moves the current position of the stream by
relativeOffset
bytes.
void *
getBuffer ()
void
write (const std::string &s)
Writes null-terminated string, including terminator.
void
write (T t)
void
write (const Buffer &buffer)
void
writeEndian (T t, uint8_t endian)
void
writeBig (T t)
void
writeLittle (T t)
void
writeData (const void *src, size_t size)
const fs::path &
getFileName () const
Returns the file name of the path from which a Stream originated when relevant. Empty string when undefined.
void
setFileName (const fs::path &aFileName)
Sets the file name of the path from which a Stream originated when relevant. Empty string when undefined.
bool
getDeleteOnDestroy () const
Returns whether the Stream has been requested to destroy its source upon its own destruction. For example,
IStreamFile
will delete its source file. Ignored in some types of streams. Defaults to
false
.
void
setDeleteOnDestroy (bool enable=true)
Sets whether the Stream has been requested to destroy its source upon its own destruction. For example,
IStreamFile
will delete its source file. Ignored in some types of streams. Defaults to
false
.