Top Description Constructors Methods
org.apache.poi.util

public Class HexRead

extends Object
Class Inheritance
Imports
java.io.*, java.nio.file.Files, .Paths, java.util.List, .ArrayList

Utilities to read hex from files. TODO - move to test packages

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static byte[]

Returns:

The bytes read from the file.
readData
(String
The filename to read
filename
)

This method reads hex data from a filename and returns a byte array.

public static byte[]
readData(InputStream stream, String section)

Same as readData(String) except that this method allows you to specify sections within a file.

public static byte[]
readData(String filename, String section)

public static byte[]
readData(InputStream stream, int eofChar)

public static byte[]
private static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

HexReadback to summary
public HexRead()

Method Detail

readDataback to summary
public static byte[] readData(String filename) throws IOException

This method reads hex data from a filename and returns a byte array. The file may contain line comments that are preceded with a # symbol.

Parameters
filename:String

The filename to read

Returns:byte[]

The bytes read from the file.

Exceptions
IOException:
If there was a problem while reading the file.
readDataback to summary
public static byte[] readData(InputStream stream, String section) throws IOException

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]
See Also
readData(String)
readDataback to summary
public static byte[] readData(String filename, String section) throws IOException
readDataback to summary
public static byte[] readData(InputStream stream, int eofChar) throws IOException
Annotations
@SuppressWarnings:fallthrough
readFromStringback to summary
public static byte[] readFromString(String data)
readToEOLback to summary
private static void readToEOL(InputStream stream) throws IOException