com.jmatio.io
Class MatFileFilter

java.lang.Object
  extended by com.jmatio.io.MatFileFilter

public class MatFileFilter
extends Object

File filter. This class is used to tell MatFileReader which matrices should be processed. This is useful when operating on big MAT-files, when there's no need to load all arrays into memory. Usage:


 //create new filter instance
 MatFileFilter filter = new MatFileFilter();
 //add a needle
 filter.addArrayName( "your_array_name" );
 
 //read array form file (haystack) looking _only_ for pecified array (needle)
 MatFileReader mfr = new MatFileReader( fileName, filter );
 

Author:
Wojciech Gradkowski (wgradkowski@gmail.com)
See Also:
com.jmatio.io.io.io.MatFileReader

Constructor Summary
MatFileFilter()
          Creates empty filter intance.
MatFileFilter(String[] names)
          Create filter intance and add array names.
 
Method Summary
 void addArrayName(String name)
          Add array name to the filter.
 boolean matches(String name)
          Test if given name matches the filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatFileFilter

public MatFileFilter()
Creates empty filter intance. Note: empty filter acceps all results.


MatFileFilter

public MatFileFilter(String[] names)
Create filter intance and add array names.

Parameters:
names - - array of names (needles)
Method Detail

addArrayName

public void addArrayName(String name)
Add array name to the filter. This array will be processed while crawling thourg the MAT-file

Parameters:
name - - array name (needle)

matches

public boolean matches(String name)
Test if given name matches the filter.

Parameters:
name - - array name to be tested
Returns:
- true if array (matrix) of this name should be processed


Copyright © 2006–2014 GeoSolutions. All rights reserved.