|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.openstego.util.CommonUtil
Common utilities for OpenStego
Constructor Summary | |
CommonUtil()
|
Method Summary | |
static byte[] |
getFileBytes(File file)
Method to get byte array data from given file |
static byte[] |
getStreamBytes(InputStream is)
Method to get byte array data from given InputStream |
static List |
parseFileList(String fileList,
String delimiter)
Method to parse a delimiter separated list of files into arraylist of filenames. |
static void |
setEnabled(JTextField textField,
boolean enabled)
Method to enable/disable a Swing JTextField object |
static void |
writeFile(byte[] fileData,
File file)
Method to write file data to disk |
static void |
writeFile(byte[] fileData,
String fileName)
Method to write file data to disk |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CommonUtil()
Method Detail |
public static byte[] getStreamBytes(InputStream is) throws OpenStegoException
is
- InputStream to read
OpenStegoException
public static byte[] getFileBytes(File file) throws OpenStegoException
file
- File to read
OpenStegoException
public static void writeFile(byte[] fileData, String fileName) throws OpenStegoException
fileData
- File datafileName
- File name (If this is null
, then data is written to stdout)
OpenStegoException
public static void writeFile(byte[] fileData, File file) throws OpenStegoException
fileData
- File datafile
- File object (If this is null
, then data is written to stdout)
OpenStegoException
public static void setEnabled(JTextField textField, boolean enabled)
textField
- Swing JTextField objectenabled
- Flag to indicate whether to enable or disable the objectpublic static List parseFileList(String fileList, String delimiter)
fileList
- Delimiter separated list of filenamesdelimiter
- Delimiter for tokenization
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |