Public Member Functions | List of all members
FileByteReadResource Class Reference

A read-only standard file on a file system which is read as bytes. More...

#include <FileByteReadResource.hpp>

Inheritance diagram for FileByteReadResource:
[legend]
Collaboration diagram for FileByteReadResource:
[legend]

Public Member Functions

 FileByteReadResource (const File &file_)
 Create a new file byte read resource from the supplied file URI. More...
 
void close () override
 Close the stream(s) in the resource. More...
 
const FilegetFile () const
 Get the file URI. More...
 
std::istream & readStream () override
 Get the input stream of the byte read resource. More...
 
const Uriuri () const override
 Get the URI associated with this resource. More...
 
- Public Member Functions inherited from Resource
virtual ~Resource ()=default
 Destroy the resource instance. More...
 

Detailed Description

A read-only standard file on a file system which is read as bytes.

Constructor & Destructor Documentation

◆ FileByteReadResource()

FileByteReadResource ( const File file_)
explicit

Create a new file byte read resource from the supplied file URI.

Exceptions
NotFoundExceptionif the file does not exist

Member Function Documentation

◆ close()

void close ( )
inlineoverridevirtual

Close the stream(s) in the resource.

Implements Resource.

◆ getFile()

const File& getFile ( ) const

Get the file URI.

Returns
the file URI

◆ readStream()

std::istream& readStream ( )
inlineoverridevirtual

Get the input stream of the byte read resource.

Implements ByteReadResource.

◆ uri()

const Uri& uri ( ) const
overridevirtual

Get the URI associated with this resource.

Implements Resource.


The documentation for this class was generated from the following file: