public class BssIOUtils
extends java.lang.Object
| Constructor and Description |
|---|
BssIOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
deleteEmptyParentFolders(java.io.File leafFolder)
Delete empty parent folders.
|
static void |
deleteFile(java.lang.String key)
Delete file.
|
static long |
fetchSize(java.lang.String key)
get file size.
|
static java.io.File |
getFile(java.lang.String key) |
static void |
init(BinaryStorageConfiguration binaryStorageConfig)
Binary Storage persistence location initialization.
|
static byte[] |
readFileToByteArray(java.lang.String path)
Reads a file, filling and return a byte array.
|
static java.io.InputStream |
readFileToInputStream(java.lang.String path)
Reads a file, filling a byte array.
|
static void |
writeByteArrayToFile(java.lang.String path,
byte[] data)
Saves array of bytes into file.
|
static void |
writeInputStreamToFile(java.lang.String path,
java.io.InputStream stream)
Writes input stream to file.
|
public static void init(BinaryStorageConfiguration binaryStorageConfig)
binaryStorageConfig - public static void writeInputStreamToFile(java.lang.String path,
java.io.InputStream stream)
throws BinaryStorageException
path - stream - BinaryStorageExceptionpublic static void writeByteArrayToFile(java.lang.String path,
byte[] data)
throws BinaryStorageException
path - data - BinaryStorageExceptionpublic static byte[] readFileToByteArray(java.lang.String path)
throws BinaryStorageException
path - BinaryStorageExceptionpublic static java.io.InputStream readFileToInputStream(java.lang.String path)
throws BinaryStorageException
BinaryStorageExceptionpublic static void deleteFile(java.lang.String key)
key - public static java.io.File getFile(java.lang.String key)
key - public static long fetchSize(java.lang.String key)
throws BinaryStorageException
key - BinaryStorageException - file does not existpublic static void deleteEmptyParentFolders(java.io.File leafFolder)
leafFolder - the leaf folder