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 - FileNotFoundExceptionIOExceptionpublic static void writeBytesToFilename(String filename, byte[] bytes)
filename - bytes - public static byte[] getBytesFromStream(InputStream inputStream) throws IOException
inputStream - FileNotFoundExceptionIOExceptionCopyright © 2000–2022 The Apache Software Foundation. All rights reserved.