BinaryIO Class Reference
provides methods for file i/o as needed by the rest of steghide
#include <BinaryIO.h>
List of all members.
Member Enumeration Documentation
Constructor & Destructor Documentation
BinaryIO::BinaryIO |
( |
void |
|
) |
|
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 |
( |
void |
|
) |
|
Member Function Documentation
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
void BinaryIO::close |
( |
void |
|
) |
|
close the currently open file - it is save to call close() even if is_std() is true
bool BinaryIO::eof |
( |
void |
|
) |
const |
is the current state of this file at the end of the file
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
MODE BinaryIO::getMode |
( |
void |
|
) |
const [inline, protected] |
const std::string& BinaryIO::getName |
( |
void |
|
) |
const [inline] |
get the name (with path) of this file
unsigned long BinaryIO::getPos |
( |
void |
|
) |
const [inline] |
get the current position in the current file
FILE* BinaryIO::getStream |
( |
void |
|
) |
const [inline] |
get the underlying cstdio FILE* pointer
void BinaryIO::init |
( |
void |
|
) |
[private] |
bool BinaryIO::is_open |
( |
void |
|
) |
const [inline] |
is this file currently opened ?
bool BinaryIO::is_std |
( |
void |
|
) |
const [inline] |
is this file a standard stream (stdin or stdout) ?
void BinaryIO::open |
( |
const std::string & |
fn, |
|
|
MODE |
m | |
|
) |
| | |
open the file given by fn in the mode m
- Parameters:
-
UWORD16 BinaryIO::read16_be |
( |
void |
|
) |
|
read two bytes from the file using big-endian byte ordering
UWORD16 BinaryIO::read16_le |
( |
void |
|
) |
|
read two bytes from the file using little-endian byte ordering
UWORD32 BinaryIO::read32_be |
( |
void |
|
) |
|
read four bytes from the file using big-endian byte ordering
UWORD32 BinaryIO::read32_le |
( |
void |
|
) |
|
read four bytes from the file using little-endian byte ordering
BYTE BinaryIO::read8 |
( |
void |
|
) |
|
read one byte from the file
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) |
std::string BinaryIO::readstring |
( |
unsigned int |
len |
) |
|
read a string with length len from the file
void BinaryIO::set_open |
( |
bool |
o |
) |
[inline, private] |
void BinaryIO::setMode |
( |
MODE |
m |
) |
[inline, protected] |
void BinaryIO::setName |
( |
const std::string & |
fn |
) |
[inline, protected] |
void BinaryIO::setStream |
( |
FILE * |
s |
) |
[inline, protected] |
void BinaryIO::write16_be |
( |
UWORD16 |
val |
) |
|
write two bytes to the file using big-endian byte ordering
void BinaryIO::write16_le |
( |
UWORD16 |
val |
) |
|
write two bytes to the file using little-endian byte ordering
void BinaryIO::write32_be |
( |
UWORD32 |
val |
) |
|
write four bytes to the file using big-endian byte ordering
void BinaryIO::write32_le |
( |
UWORD32 |
val |
) |
|
write four bytes to the file using little-endian byte ordering
void BinaryIO::write8 |
( |
BYTE |
val |
) |
|
write one byte to the file
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 |
void BinaryIO::writestring |
( |
const std::string & |
s |
) |
|
Member Data Documentation
The documentation for this class was generated from the following files: