common::Base64Encoder Class Reference
[Stream Module]
Koduje strumień binarnych danych wejściowych na ciąg znaków base64.
More...
#include <Stream.hpp>
List of all members.
Public Member Functions |
| | Base64Encoder (Stream *a_Stream) |
| | ~Base64Encoder () |
| void | Finish () |
| virtual void | Write (const void *Data, size_t Size) |
| | Zapisuje dane.
|
| virtual void | Flush () |
Static Public Member Functions |
| static size_t | EncodeLength (size_t DataLength) |
| | Oblicza rozmiar bufora na zakodowane dane.
|
| static size_t | Encode (char *Out, const void *Data, size_t DataLength) |
| | Po prostu koduje podane dane.
|
| static size_t | Encode (string *Out, const void *Data, size_t DataLength) |
| | Po prostu koduje podane dane.
|
Detailed Description
Koduje strumień binarnych danych wejściowych na ciąg znaków base64.
- Zgodny z RFC 4648 "The Base16, Base32, and Base64 Data Encodings"
- Prawidłowe dane wyjściowe powstają dopiero po zakończeniu zapisywania, które następuje w destruktorze. Jeśli chcesz zakończyć wcześniej, wywołaj Base64Encoder::Finish(), ale potem nie można już nic dopisywać.
Constructor & Destructor Documentation
| common::Base64Encoder::Base64Encoder |
( |
Stream * |
a_Stream |
) |
[inline] |
| common::Base64Encoder::~Base64Encoder |
( |
|
) |
|
Member Function Documentation
| static size_t common::Base64Encoder::Encode |
( |
string * |
Out, |
|
|
const void * |
Data, |
|
|
size_t |
DataLength | |
|
) |
| | [static] |
Po prostu koduje podane dane.
- Parameters:
-
| [out] | Out | Łańcuch wyjściowy Out nie musi mieć żadnego konkretnego rozmiaru - zostaje wyczyszczony i wypełniony od nowa. |
| static size_t common::Base64Encoder::Encode |
( |
char * |
Out, |
|
|
const void * |
Data, |
|
|
size_t |
DataLength | |
|
) |
| | [static] |
Po prostu koduje podane dane.
- Parameters:
-
| [out] | Out | Bufor wyjściowy Out musi mieć zaalokowane przynajmniej tyle bajtów ile wyliczyło EncodeLength. |
- Returns:
- Zwraca liczbę znaków zapisanych do Out.
| static size_t common::Base64Encoder::EncodeLength |
( |
size_t |
DataLength |
) |
[static] |
Oblicza rozmiar bufora na zakodowane dane.
| void common::Base64Encoder::Finish |
( |
|
) |
[inline] |
| virtual void common::Base64Encoder::Flush |
( |
|
) |
[inline, virtual] |
| virtual void common::Base64Encoder::Write |
( |
const void * |
Data, |
|
|
size_t |
Size | |
|
) |
| | [virtual] |
Zapisuje dane.
(W oryginale: zgłasza błąd)
Reimplemented from common::Stream.
The documentation for this class was generated from the following file: