|
JMatIO 0.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jmatio.io.MatFileReader
public class MatFileReader
| Field Summary | |
|---|---|
static int |
DIRECT_BYTE_BUFFER
|
static int |
HEAP_BYTE_BUFFER
|
static int |
MEMORY_MAPPED_FILE
|
| Constructor Summary | |
|---|---|
MatFileReader()
|
|
MatFileReader(java.io.File file)
Creates instance of MatFileReader and reads MAT-file
from file. |
|
MatFileReader(java.io.File file,
MatFileFilter filter)
Creates instance of MatFileReader and reads MAT-file from
file. |
|
MatFileReader(java.lang.String fileName)
Creates instance of MatFileReader and reads MAT-file
from location given as fileName. |
|
MatFileReader(java.lang.String fileName,
MatFileFilter filter)
Creates instance of MatFileReader and reads MAT-file
from location given as fileName. |
|
| Method Summary | |
|---|---|
java.util.Map<java.lang.String,MLArray> |
getContent()
Returns a map of MLArray objects that were inside MAT-file. |
java.util.ArrayList<MLArray> |
getData()
Deprecated. use getContent which returns a Map to provide
easier access to MLArrays contained in MAT-file |
MatFileHeader |
getMatFileHeader()
Gets MAT-file header |
MLArray |
getMLArray(java.lang.String name)
Returns the value to which the red file maps the specified array name. |
java.util.Map<java.lang.String,MLArray> |
read(java.io.File file)
Reads the content of a MAT-file and returns the mapped content. |
java.util.Map<java.lang.String,MLArray> |
read(java.io.File file,
int policy)
Reads the content of a MAT-file and returns the mapped content. |
java.util.Map<java.lang.String,MLArray> |
read(java.io.File file,
MatFileFilter filter,
int policy)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MEMORY_MAPPED_FILE
public static final int DIRECT_BYTE_BUFFER
public static final int HEAP_BYTE_BUFFER
| Constructor Detail |
|---|
public MatFileReader(java.lang.String fileName)
throws java.io.FileNotFoundException,
java.io.IOException
MatFileReader and reads MAT-file
from location given as fileName.
This method reads MAT-file without filtering.
fileName - the MAT-file path String
java.io.IOException - when error occurred while processing the file.
java.io.FileNotFoundException
public MatFileReader(java.lang.String fileName,
MatFileFilter filter)
throws java.io.IOException
MatFileReader and reads MAT-file
from location given as fileName.
Results are filtered by MatFileFilter. Arrays that do not meet
filter match condition will not be available in results.
fileName - the MAT-file path StringMatFileFilter - array name filter.
java.io.IOException - when error occurred while processing the file.
public MatFileReader(java.io.File file)
throws java.io.IOException
MatFileReader and reads MAT-file
from file.
This method reads MAT-file without filtering.
file - the MAT-file
java.io.IOException - when error occurred while processing the file.
public MatFileReader(java.io.File file,
MatFileFilter filter)
throws java.io.IOException
MatFileReader and reads MAT-file from
file.
Results are filtered by MatFileFilter. Arrays that do not
meet filter match condition will not be available in results.
Note: this method reads file using the memory mapped file policy, see
notes to #read(File, MatFileFilter, com.jmatio.io.MatFileReader.MallocPolicy)
file - the MAT-fileMatFileFilter - array name filter.
java.io.IOException - when error occurred while processing the file.public MatFileReader()
| Method Detail |
|---|
public java.util.Map<java.lang.String,MLArray> read(java.io.File file)
throws java.io.IOException
This method calls
read(file, new MatFileFilter(), MallocPolicy.MEMORY_MAPPED_FILE).
file - a valid MAT-file file to be read
getContent()
java.io.IOException - if error occurs during file processing
public java.util.Map<java.lang.String,MLArray> read(java.io.File file,
int policy)
throws java.io.IOException
This method calls
read(file, new MatFileFilter(), policy).
file - a valid MAT-file file to be readpolicy - the file memory allocation policy
getContent()
java.io.IOException - if error occurs during file processing
public java.util.Map<java.lang.String,MLArray> read(java.io.File file,
MatFileFilter filter,
int policy)
throws java.io.IOException
java.io.IOExceptionpublic MatFileHeader getMatFileHeader()
MatFileHeader objectpublic java.util.ArrayList<MLArray> getData()
getContent which returns a Map to provide
easier access to MLArrays contained in MAT-file
MLArray objects that were inside MAT-file
ArrayListpublic MLArray getMLArray(java.lang.String name)
null if the file contains no content for this name.
- - array name
MLArray to which this file maps the specified name,
or null if the file contains no content for this name.public java.util.Map<java.lang.String,MLArray> getContent()
MLArray objects that were inside MAT-file.
MLArrays are mapped with MLArrays' names
Map of MLArrays mapped with their names.
|
JMatIO 0.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||