Qore FileLocationHandler Module Reference 2.3
Loading...
Searching...
No Matches
FileLocationHandler::FileLocationHandlerData Class Reference

The class for handling "data://" locations. More...

#include <FileLocationHandlerData.qc.dox.h>

Inheritance diagram for FileLocationHandler::FileLocationHandlerData:
[legend]

Protected Member Functions

binary getBinaryFileImpl (string scheme, string location, *hash< auto > opts)
 Retrieves a binary file from the given location.
 
Qore::InputStream getBinaryStreamImpl (string scheme, string location, *hash< auto > opts)
 Retrieves a binary file from the given location.
 
Qore::AbstractPollOperation getIoPollerForLocationImpl (string scheme, string location, *hash< auto > opts)
 Retrieves an I/O poller to retrieve a binary file from the given location.
 
OutputStreamWrapper getOutputStreamImpl (string scheme, string location, *hash< auto > opts)
 Not supported for data:// locations; throws an exception.
 
hash< string, hash< FileHandlerOptionInfo > > getReadOptionsImpl ()
 Gets supported read options.
 
Qore::StreamReader getStreamReaderImpl (string scheme, string location, *hash< auto > opts)
 Returns a stream reader for the file's data at the given location.
 
string getTextFileImpl (string scheme, string location, *hash< auto > opts)
 Retrieves a text file from the given location.
 
hash< string, hash< FileHandlerOptionInfo > > getWriteOptionsImpl ()
 Gets supported write options.
 
 writeFileImpl (string scheme, string location, data contents, *hash< auto > opts)
 Not supported for data:// locations; throws an exception.
 
- Protected Member Functions inherited from FileLocationHandler::AbstractFileLocationHandler
abstract binary getBinaryFileImpl (string scheme, string location, *hash< auto > opts)
 Retrieves a binary file from the given location.
 
abstract Qore::InputStream getBinaryStreamImpl (string scheme, string location, *hash< auto > opts)
 Retrieves a binary file from the given location.
 
abstract Qore::AbstractPollOperation getIoPollerForLocationImpl (string scheme, string location, *hash< auto > opts)
 Retrieves an I/O poller to retrieve a binary file from the given location.
 
abstract OutputStreamWrapper getOutputStreamImpl (string scheme, string location, *hash< auto > opts)
 Returns an output stream for writing data to the given location.
 
abstract hash< string, hash< FileHandlerOptionInfo > > getReadOptionsImpl ()
 Gets supported read options.
 
abstract Qore::StreamReader getStreamReaderImpl (string scheme, string location, *hash< auto > opts)
 Returns a string stream for the file's data at the given location.
 
abstract string getTextFileImpl (string scheme, string location, *hash< auto > opts)
 Retrieves a text file from the given location.
 
abstract hash< string, hash< FileHandlerOptionInfo > > getWriteOptionsImpl ()
 Gets supported write options.
 
abstract writeFileImpl (string scheme, string location, data contents, *hash< auto > opts)
 Writes data to a file at the given location.
 

Additional Inherited Members

- Public Member Functions inherited from FileLocationHandler::AbstractFileLocationHandler
binary getBinaryFile (string scheme, string location, *hash< auto > opts)
 Retrieves a binary file from the given location.
 
Qore::InputStream getBinaryStream (string scheme, string location, *hash< auto > opts)
 Retrieves a binary file from the given location.
 
Qore::AbstractPollOperation getIoPollerForLocation (string scheme, string location, *hash< auto > opts)
 Retrieves an I/O poller to retrieve a binary file from the given location.
 
OutputStreamWrapper getOutputStream (string scheme, string location, *hash< auto > opts)
 Returns an output stream for writing data to the given location.
 
hash< string, hash< FileHandlerOptionInfo > > getReadOptions ()
 Gets supported read options.
 
Qore::StreamReader getStreamReader (string scheme, string location, *hash< auto > opts)
 Returns a string stream for the file's data at the given location.
 
string getTextFile (string scheme, string location, *hash< auto > opts)
 Retrieves a text file from the given location.
 
hash< string, hash< FileHandlerOptionInfo > > getWriteOptions ()
 Gets supported write options.
 
 writeFile (string scheme, string location, data contents, *hash< auto > opts)
 Writes data to a file at the given location.
 
- Static Protected Member Functions inherited from FileLocationHandler::AbstractFileLocationHandler
static string forceEncoding (string str, *string encoding)
 Returns a string tagged with the given encoding, if any.
 

Detailed Description

The class for handling "data://" locations.

This location can be used for reading immediate data; data:// locations cannot be written to

Member Function Documentation

◆ getBinaryFileImpl()

binary FileLocationHandler::FileLocationHandlerData::getBinaryFileImpl ( string scheme,
string location,
*hash< auto > opts )
protected

Retrieves a binary file from the given location.

Parameters
schemethe scheme being used
locationthe location string without the scheme
optsread options
Returns
the location string without the scheme converted to binary data

◆ getBinaryStreamImpl()

Qore::InputStream FileLocationHandler::FileLocationHandlerData::getBinaryStreamImpl ( string scheme,
string location,
*hash< auto > opts )
protected

Retrieves a binary file from the given location.

Parameters
schemethe scheme being used
locationthe location string without the scheme
optsread options
Returns
an input stream of the file's contents, if it can be retrieved

◆ getIoPollerForLocationImpl()

Qore::AbstractPollOperation FileLocationHandler::FileLocationHandlerData::getIoPollerForLocationImpl ( string scheme,
string location,
*hash< auto > opts )
protected

Retrieves an I/O poller to retrieve a binary file from the given location.

Parameters
schemethe scheme being used
locationthe location string without the scheme
optsread options
Returns
an I/O poller to retrieve the file's data

◆ getOutputStreamImpl()

OutputStreamWrapper FileLocationHandler::FileLocationHandlerData::getOutputStreamImpl ( string scheme,
string location,
*hash< auto > opts )
protected

Not supported for data:// locations; throws an exception.

Parameters
schemethe scheme being used
locationthe location string without the scheme
optswrite options
Exceptions
DATA-WRITE-ERRORcannot write to data:// locations

◆ getReadOptionsImpl()

hash< string, hash< FileHandlerOptionInfo > > FileLocationHandler::FileLocationHandlerData::getReadOptionsImpl ( )
protected

Gets supported read options.

Returns
supported read options

◆ getStreamReaderImpl()

Qore::StreamReader FileLocationHandler::FileLocationHandlerData::getStreamReaderImpl ( string scheme,
string location,
*hash< auto > opts )
protected

Returns a stream reader for the file's data at the given location.

Parameters
schemethe scheme being used
locationthe location string without the scheme
optsread options
Returns
a stream reader for the location string without the scheme

◆ getTextFileImpl()

string FileLocationHandler::FileLocationHandlerData::getTextFileImpl ( string scheme,
string location,
*hash< auto > opts )
protected

Retrieves a text file from the given location.

Parameters
schemethe scheme being used
locationthe location string without the scheme
optsread options
Returns
the location string without the scheme

◆ getWriteOptionsImpl()

hash< string, hash< FileHandlerOptionInfo > > FileLocationHandler::FileLocationHandlerData::getWriteOptionsImpl ( )
protected

Gets supported write options.

Returns
supported write options

◆ writeFileImpl()

FileLocationHandler::FileLocationHandlerData::writeFileImpl ( string scheme,
string location,
data contents,
*hash< auto > opts )
protected

Not supported for data:// locations; throws an exception.

Parameters
schemethe scheme being used
locationthe location string without the scheme
contentsthe file's contents
optswrite options
Exceptions
DATA-WRITE-ERRORcannot write to data:// locations