public class JavaUtils extends Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
getBytesFromFile(String fileName)
Method getBytesFromFile
|
static byte[] |
getBytesFromStream(InputStream inputStream)
This method reads all bytes from the given InputStream till EOF and
returns them as a byte array.
|
static void |
writeBytesToFilename(String filename,
byte[] bytes)
Method writeBytesToFilename
|
public static byte[] getBytesFromFile(String fileName) throws FileNotFoundException, IOException
fileName
- FileNotFoundException
IOException
public static void writeBytesToFilename(String filename, byte[] bytes)
filename
- bytes
- public static byte[] getBytesFromStream(InputStream inputStream) throws IOException
inputStream
- FileNotFoundException
IOException
Copyright © 2000-2012 The Apache Software Foundation. All Rights Reserved.