org.apache.poi.util
Class HexRead

java.lang.Object
  |
  +--org.apache.poi.util.HexRead

public class HexRead
extends java.lang.Object

Utilities to read hex from files. * * @author Marc Johnson * @author Glen Stampoultzis (glens at apache.org)


Constructor Summary
HexRead()
           
 
Method Summary
static byte[] readData(java.lang.String filename)
          This method reads hex data from a filename and returns a byte array.
static byte[] readData(java.lang.String filename, java.lang.String section)
          Same as readData(String) except that this method allows you to specify sections within * a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HexRead

public HexRead()
Method Detail

readData

public static byte[] readData(java.lang.String filename)
                       throws java.io.IOException
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. * * @param filename The filename to read * @return The bytes read from the file. * @throws IOException If there was a problem while reading the file.

java.io.IOException

readData

public static byte[] readData(java.lang.String filename,
                              java.lang.String section)
                       throws java.io.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 #readData(String)

java.io.IOException


Copyright © 2003 Apache Software Foundation.