provides methods for file i/o as needed by the rest of steghide
#include <BinaryIO.h>
§ MODE
§ BinaryIO() [1/2]
BinaryIO::BinaryIO |
( |
void |
| ) |
|
§ BinaryIO() [2/2]
BinaryIO::BinaryIO |
( |
const std::string & |
fn, |
|
|
MODE |
m |
|
) |
| |
construct a BinaryIO object
- Parameters
-
The file described by fn is opened in the given mode.
§ ~BinaryIO()
BinaryIO::~BinaryIO |
( |
void |
| ) |
|
§ checkForce()
void BinaryIO::checkForce |
( |
const std::string & |
fn | ) |
const |
|
private |
when opening a file in write mode perform various checks depending on the value of the force argument
§ close()
void BinaryIO::close |
( |
void |
| ) |
|
close the currently open file - it is save to call close() even if is_std() is true
§ eof()
bool BinaryIO::eof |
( |
void |
| ) |
const |
is the current state of this file at the end of the file
§ Fileexists()
bool BinaryIO::Fileexists |
( |
const std::string & |
fn | ) |
const |
|
private |
check if the file described by fn exists
- Returns
- true iff a fopen call with fn as file name succeeded
§ getMode()
MODE BinaryIO::getMode |
( |
void |
| ) |
const |
|
inlineprotected |
§ getName()
const std::string& BinaryIO::getName |
( |
void |
| ) |
const |
|
inline |
get the name (with path) of this file
§ getPos()
unsigned long BinaryIO::getPos |
( |
void |
| ) |
const |
|
inline |
get the current position in the current file
§ getStream()
FILE* BinaryIO::getStream |
( |
void |
| ) |
const |
|
inline |
get the underlying cstdio FILE* pointer
§ init()
void BinaryIO::init |
( |
void |
| ) |
|
|
private |
§ is_open()
bool BinaryIO::is_open |
( |
void |
| ) |
const |
|
inline |
is this file currently opened ?
§ is_std()
bool BinaryIO::is_std |
( |
void |
| ) |
const |
|
inline |
is this file a standard stream (stdin or stdout) ?
§ open()
void BinaryIO::open |
( |
const std::string & |
fn, |
|
|
MODE |
m |
|
) |
| |
open the file given by fn in the mode m
- Parameters
-
§ read16_be()
UWORD16 BinaryIO::read16_be |
( |
void |
| ) |
|
read two bytes from the file using big-endian byte ordering
§ read16_le()
UWORD16 BinaryIO::read16_le |
( |
void |
| ) |
|
read two bytes from the file using little-endian byte ordering
§ read32_be()
UWORD32 BinaryIO::read32_be |
( |
void |
| ) |
|
read four bytes from the file using big-endian byte ordering
§ read32_le()
UWORD32 BinaryIO::read32_le |
( |
void |
| ) |
|
read four bytes from the file using little-endian byte ordering
§ read8()
BYTE BinaryIO::read8 |
( |
void |
| ) |
|
read one byte from the file
§ read_le()
UWORD32 BinaryIO::read_le |
( |
unsigned short |
n | ) |
|
read n bytes (little endian byte ordering)
- Parameters
-
n | the number of bytes to read (must be <= 4) |
§ readstring()
std::string BinaryIO::readstring |
( |
unsigned int |
len | ) |
|
read a string with length len from the file
§ set_open()
void BinaryIO::set_open |
( |
bool |
o | ) |
|
|
inlineprivate |
§ setMode()
void BinaryIO::setMode |
( |
MODE |
m | ) |
|
|
inlineprotected |
§ setName()
void BinaryIO::setName |
( |
const std::string & |
fn | ) |
|
|
inlineprotected |
§ setStream()
void BinaryIO::setStream |
( |
FILE * |
s | ) |
|
|
inlineprotected |
§ write16_be()
void BinaryIO::write16_be |
( |
UWORD16 |
val | ) |
|
write two bytes to the file using big-endian byte ordering
§ write16_le()
void BinaryIO::write16_le |
( |
UWORD16 |
val | ) |
|
write two bytes to the file using little-endian byte ordering
§ write32_be()
void BinaryIO::write32_be |
( |
UWORD32 |
val | ) |
|
write four bytes to the file using big-endian byte ordering
§ write32_le()
void BinaryIO::write32_le |
( |
UWORD32 |
val | ) |
|
write four bytes to the file using little-endian byte ordering
§ write8()
void BinaryIO::write8 |
( |
BYTE |
val | ) |
|
write one byte to the file
§ write_le()
void BinaryIO::write_le |
( |
UWORD32 |
val, |
|
|
unsigned short |
n |
|
) |
| |
write n bytes of val (little endian byte ordering)
- Parameters
-
n | the number of bytes to write (must be <= 4) |
val | the value |
§ writestring()
void BinaryIO::writestring |
( |
const std::string & |
s | ) |
|
§ FileOpen
§ Mode
§ Name
std::string BinaryIO::Name |
|
private |
§ Stream
The documentation for this class was generated from the following files: