|
SMILA 1.0 API documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.smila.binarystorage.persistence.efs.EFSUtils
public class EFSUtils
EFS utility class.
Constructor Summary | |
---|---|
EFSUtils()
|
Method Summary | |
---|---|
static void |
deleteFile(java.lang.String path)
Delete file. |
static long |
fetchSize(java.lang.String path)
get file size |
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)
|
static void |
writeInputStreamToFile(java.lang.String path,
java.io.InputStream stream)
Writes input stream to file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EFSUtils()
Method Detail |
---|
public static void init(BinaryStorageConfiguration binaryStorageConfig)
binaryStorageConfig
- public static void writeInputStreamToFile(java.lang.String path, java.io.InputStream stream) throws BinaryStorageException
path
- stream
-
BinaryStorageException
public static void writeByteArrayToFile(java.lang.String path, byte[] data) throws BinaryStorageException
key
- content
-
BinaryStorageException
public static byte[] readFileToByteArray(java.lang.String path) throws BinaryStorageException
path
-
BinaryStorageException
public static java.io.InputStream readFileToInputStream(java.lang.String path) throws BinaryStorageException
path
-
BinaryStorageException
public static void deleteFile(java.lang.String path) throws BinaryStorageException
key
-
BinaryStorageException
public static long fetchSize(java.lang.String path) throws BinaryStorageException
path
-
BinaryStorageException
- file does not exist
|
SMILA 1.0 API documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |