net.sourceforge.openstego
Class DataHeader

java.lang.Object
  extended bynet.sourceforge.openstego.DataHeader

public class DataHeader
extends java.lang.Object

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
 
Constructor Summary
DataHeader(java.io.InputStream dataInStream, StegoConfig config)
          This constructor should be used when reading embedded data from an InputStream.
DataHeader(int dataLength, int channelBitsUsed, StegoConfig config)
          This constructor should normally be used when writing the data.
 
Method Summary
 int getChannelBitsUsed()
          Get Method for channelBitsUsed
 int getDataLength()
          Get Method for dataLength
 byte[] getHeaderData()
          This method generates the header in the form of byte array based on the parameters provided in the constructor.
static int getHeaderSize()
          Method to get standard header size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_STAMP

public static final byte[] DATA_STAMP
Magic string at the start of the header to identify OpenStego embedded data

Constructor Detail

DataHeader

public DataHeader(int dataLength,
                  int channelBitsUsed,
                  StegoConfig config)
This constructor should normally be used when writing the data.

Parameters:
dataLength - Length of the data embedded in the image (excluding the header data)
channelBitsUsed - Number of bits used per color channel for embedding the data
config - StegoConfig instance to hold the configuration data

DataHeader

public DataHeader(java.io.InputStream dataInStream,
                  StegoConfig config)
           throws java.io.IOException
This constructor should be used when reading embedded data from an InputStream.

Parameters:
dataInStream - Data input stream containing the embedded data
config - StegoConfig instance to hold the configuration data
Throws:
java.io.IOException
Method Detail

getHeaderData

public byte[] getHeaderData()
This method generates the header in the form of byte array based on the parameters provided in the constructor.

Returns:
Header data

getChannelBitsUsed

public int getChannelBitsUsed()
Get Method for channelBitsUsed

Returns:
channelBitsUsed

getDataLength

public int getDataLength()
Get Method for dataLength

Returns:
dataLength

getHeaderSize

public static int getHeaderSize()
Method to get standard header size

Returns:
Header size