|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.openstego.DataHeader
This class holds the header data for the data that needs to be embedded in the image. First, the header data gets written inside the image, and then the actual data is written.
Field Summary | |
static byte[] |
DATA_STAMP
Magic string at the start of the header to identify OpenStego embedded data |
static byte[] |
HEADER_VERSION
Header version to distinguish between various versions of data embedding. |
Constructor Summary | |
DataHeader(java.io.InputStream dataInStream,
OpenStegoConfig config)
This constructor should be used when reading embedded data from an InputStream. |
|
DataHeader(int dataLength,
int channelBitsUsed,
java.lang.String fileName,
OpenStegoConfig config)
This constructor should normally be used when writing the data. |
Method Summary | |
static int |
byteToInt(int b)
Byte to Int converter |
int |
getChannelBitsUsed()
Get Method for channelBitsUsed |
int |
getDataLength()
Get Method for dataLength |
java.lang.String |
getFileName()
Get Method for fileName |
byte[] |
getHeaderData()
This method generates the header in the form of byte array based on the parameters provided in the constructor. |
int |
getHeaderSize()
Method to get size of the current header |
static int |
getMaxHeaderSize()
Method to get the maximum possible size of the header |
void |
setChannelBitsUsed(int channelBitsUsed)
Set Method for channelBitsUsed |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final byte[] DATA_STAMP
public static final byte[] HEADER_VERSION
Constructor Detail |
public DataHeader(int dataLength, int channelBitsUsed, java.lang.String fileName, OpenStegoConfig config)
dataLength
- Length of the data embedded in the image (excluding the header data)channelBitsUsed
- Number of bits used per color channel for embedding the datafileName
- Name of the file of data being embeddedconfig
- OpenStegoConfig instance to hold the configuration datapublic DataHeader(java.io.InputStream dataInStream, OpenStegoConfig config) throws OpenStegoException
dataInStream
- Data input stream containing the embedded dataconfig
- OpenStegoConfig instance to hold the configuration data
OpenStegoException
Method Detail |
public byte[] getHeaderData()
public int getChannelBitsUsed()
public void setChannelBitsUsed(int channelBitsUsed)
channelBitsUsed
- public int getDataLength()
public java.lang.String getFileName()
public int getHeaderSize()
public static int getMaxHeaderSize()
public static int byteToInt(int b)
b
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |