Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
BinaryToText.h File Reference
#include "Stroika/Foundation/StroikaPreComp.h"
#include <optional>
#include "Stroika/Foundation/Characters/CodeCvt.h"
#include "Stroika/Foundation/Characters/UTFConvert.h"
#include "Stroika/Foundation/Execution/Synchronized.h"
#include "Stroika/Foundation/Streams/InputStream.h"
#include "BinaryToText.inl"

Go to the source code of this file.

Namespaces

namespace  Stroika::Foundation
 
namespace  Stroika::Foundation::Streams::BinaryToText::Reader
 BinaryToText::Reader::Ptr is an InputStream::Ptr<Character>, usually constructed wrapping some binary object or binary stream.
 

Typedefs

using Stroika::Foundation::Streams::BinaryToText::Reader::Ptr = InputStream::Ptr< Character >
 BinaryToText::Readers produce text in the form of an InputStream of 'Character' objects (so you might get the text with ReadAll()).
 

Enumerations

enum class  Stroika::Foundation::Streams::BinaryToText::Reader::ReadAhead
 

Functions

Ptr Stroika::Foundation::Streams::BinaryToText::Reader::New (const InputStream::Ptr< byte > &src, optional< AutomaticCodeCvtFlags > codeCvtFlags={}, optional< SeekableFlag > seekable={}, ReadAhead readAhead=eReadAheadAllowed)
 Create an InputStream::Ptr<Character> from the arguments (usually binary source) - which can be used to Read out the text as a string.
 
Characters::String Stroika::Foundation::Streams::BinaryToText::Convert (const Memory::BLOB &src, optional< AutomaticCodeCvtFlags > codeCvtFlags={})
 convert BLOB (using optional encoding parameter) to a String
 

Detailed Description

Note
Code-Status: Beta

Definition in file BinaryToText.h.

Function Documentation

◆ Convert()

String Stroika::Foundation::Streams::BinaryToText::Convert ( const Memory::BLOB src,
optional< AutomaticCodeCvtFlags >  codeCvtFlags = {} 
)

convert BLOB (using optional encoding parameter) to a String

Note
shorthand for BinaryToText::Reader::New (src, codeCvtFlags).ReadAll ())
could have done with stream, but the API names suggest side-effect free, and that wouldn't be, since it seeks the src input stream.

Definition at line 528 of file BinaryToText.cpp.