Package loci.poi.util
Class HexRead
java.lang.Object
loci.poi.util.HexRead
Utilities to read hex from files.
- Author:
- Marc Johnson, Glen Stampoultzis (glens at apache.org)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]readData(InputStream stream, int eofChar) static byte[]This method reads hex data from a filename and returns a byte array.static byte[]Same as readData(String) except that this method allows you to specify sections within a file.static byte[]readFromString(String data)
-
Constructor Details
-
HexRead
public HexRead()
-
-
Method Details
-
readData
This method reads hex data from a filename and returns a byte array. The file may contain line comments that are preceeded with a # symbol.- Parameters:
filename- The filename to read- Returns:
- The bytes read from the file.
- Throws:
IOException- If there was a problem while reading the file.
-
readData
Same as readData(String) except that this method allows you to specify sections within a file. Sections are referenced using section headers in the form:[sectioname]
- Throws:
IOException- See Also:
-
readData
- Throws:
IOException
-
readFromString
- Throws:
IOException
-