Hex reader helper stuff.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353181 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Glen Stampoultzis 2003-06-30 12:29:05 +00:00
parent 0e07f23fb3
commit a3d6a57ec3

View File

@ -54,10 +54,7 @@
package org.apache.poi.util; package org.apache.poi.util;
import java.io.IOException; import java.io.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
@ -207,6 +204,11 @@ public class HexRead
return rval; return rval;
} }
static public byte[] readFromString(String data) throws IOException
{
return readData(new ByteArrayInputStream( data.getBytes() ), -1);
}
static private void readToEOL( InputStream stream ) throws IOException static private void readToEOL( InputStream stream ) throws IOException
{ {
int c = stream.read(); int c = stream.read();