nlib
|
The class for writing data after encoding it in Base64
.
More...
#include "nn/nlib/Base64OutputStream.h"
Public Types | |
enum | NewLineMode { NEWLINEMODE_NONE = 0, NEWLINEMODE_CRLF, NEWLINEMODE_LF } |
The newline options for the output Base64 text. The default is NEWLINEMODE_NONE . More... | |
![]() | |
enum | BufferingMode { BUFFERINGMODE_BLOCKBUFFERED = 0, BUFFERINGMODE_LINEBUFFERED, BUFFERINGMODE_UNBUFFERED } |
The buffering mode for OutputStream . More... | |
Public Member Functions | |
errno_t | Init (CharOption char_option) noexcept |
Initializes an object. For information on the arguments, see Base64Encoder::CharOption . | |
errno_t | Init () noexcept |
Runs Init(Base64Encoder::BASE64_DEFAULT) . | |
void | SetNewLineMode (NewLineMode mode) noexcept |
Sets the newline mode. More... | |
![]() | |
errno_t | SetStream (OutputStream *ostr) noexcept |
Sets an output stream as the base stream. More... | |
OutputStream * | GetStream () const noexcept |
Gets the input stream that will be the base stream. More... | |
![]() | |
size_t | Pos () const noexcept |
Returns the current position in the stream. More... | |
uint64_t | Pos64 () const noexcept |
Returns the current position in the stream as a 64-bit integer. More... | |
bool | Write (int b) noexcept |
Writes one byte of data to the stream. More... | |
bool | Write (const void *p, size_t n) noexcept |
Writes n bytes of data to the stream. More... | |
bool | WriteGather (const nlib_fd_iovec *iov, int iovcnt) noexcept |
Writes data from multiple non-continuous buffers to a stream. More... | |
bool | Flush () noexcept |
Flushes the stream. More... | |
bool | Close () noexcept |
Closes the stream after it has been flushed. Returns true if successful. More... | |
errno_t | GetErrorValue () const noexcept |
Gets the error value. More... | |
BufferingMode | GetBufferingMode () const noexcept |
Gets the buffering mode. | |
operator bool () const | |
Returns true if no internal error has occurred. | |
constexpr | OutputStream () noexcept |
Instantiates the object with default parameters (default constructor). | |
virtual | ~OutputStream () noexcept |
Destructor. Does not do anything. | |
Additional Inherited Members | |
![]() | |
void | ResetBuffer (void *p, size_t nbytes) noexcept |
Sets the buffer held by OutputStream . More... | |
void | SetError (errno_t e) const noexcept |
Sets an error to OutputStream . More... | |
![]() | |
BufferingMode | m_BufferingMode |
Stores the buffering mode. More... | |
The class for writing data after encoding it in Base64
.
OutputConverterStream
is held in the base class. When operating as OutputStream
, the data is encoded in Base64
. The InputConverterStream::SetStream
function sets a stream, and then Base64
-converted data is written to this stream. Base64OutputStream
has been flushed, this stream is flushed after the Base64
-converted data is written to it. Any data for which there are no set corresponding Base64
characters is held and not written to this stream. Base64OutputStream
is closed, this stream is flushed after all data has been written to it and then it is detached. However, this stream is not closed. Init()
is necessary on and after the 2015-01-26 version. Definition at line 11 of file Base64OutputStream.h.
The newline options for the output Base64
text. The default is NEWLINEMODE_NONE
.
Definition at line 15 of file Base64OutputStream.h.
|
noexcept |
Sets the newline mode.
[in] | mode | The newline mode. |
© 2012-2016 Nintendo Co., Ltd. All rights reserved.