public class OdStoIF
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
EOF_ABRUPT |
static int |
EOF_NOMINAL |
static int |
IOEXCEPTION |
java.lang.String |
message |
static int |
SUCCESS |
static int |
WRONG_FORMAT |
| Constructor and Description |
|---|
OdStoIF() |
| Modifier and Type | Method and Description |
|---|---|
void |
CloseFramesReader()
Terminates the access to the chunk
|
int |
deleteDirectory(java.lang.String dirname,
boolean deleteIfNotEmpty)
Deletes a directory from the storage.
|
int |
deleteFile(java.lang.String filename)
Deletes a file from the storage.
|
java.util.ArrayList<java.lang.String> |
GetContents(java.io.File directory)
Gets a listing of the contents of a directory
|
java.util.ArrayList<java.lang.String> |
GetContentsByFilter(java.io.File directory,
java.lang.String filter)
Gets a listing of the contents of a directory, by applying a filter to get the chunks that correspond to a specific filter
|
long |
GetTimestamp()
Gets the long number representation of the timestamp that exists in the header
|
int |
OpenFramesReader(java.lang.String filename,
int bufferSize,
int imageSize,
int maxMemoryUsageMB)
Initialises access to a chunk for reading frames
|
int |
ReadFrame(int[] frame)
Read a single frame from the current open stream, by checking also its header.
|
public static final int SUCCESS
public static final int EOF_NOMINAL
public static final int EOF_ABRUPT
public static final int WRONG_FORMAT
public static final int IOEXCEPTION
public java.lang.String message
public int OpenFramesReader(java.lang.String filename,
int bufferSize,
int imageSize,
int maxMemoryUsageMB)
filename - the name of the chunkframeBufferSize - the size of the buffer to be used for reading a single frame (relates to the size of the frame plus its header)imageSize - the total number of pixels for a framemaxMemoryUsageMB - the maximum size of the memory to be allocated in MB, for loading large parts from the chunkspublic void CloseFramesReader()
public int ReadFrame(int[] frame)
frame - the buffer to be filled with the frame datapublic long GetTimestamp()
public java.util.ArrayList<java.lang.String> GetContents(java.io.File directory)
directory - the pointer to the directorypublic java.util.ArrayList<java.lang.String> GetContentsByFilter(java.io.File directory,
java.lang.String filter)
directory - the pointer to the directoryfilter - the name of the target filter, "R" or "I"public int deleteFile(java.lang.String filename)
filename - the name of the file to be deletedpublic int deleteDirectory(java.lang.String dirname,
boolean deleteIfNotEmpty)
dirname - the name of the directory to be deleteddeleteIfNotEmpty - specifies whether the directory will still be deleted, even if it is not empty