svn-gvsig-desktop / tags / J2ME_compat_v1_2_Build_1209 / libraries / libFMap / src / com / iver / cit / gvsig / fmap / drivers / shp / MyFileFilter.java @ 19509
History | View | Annotate | Download (519 Bytes)
1 | 19509 | jcarrasco | package com.iver.cit.gvsig.fmap.drivers.shp; |
---|---|---|---|
2 | |||
3 | import java.io.File; |
||
4 | import java.io.FileFilter; |
||
5 | |||
6 | public class MyFileFilter implements FileFilter { |
||
7 | private String shpPath; |
||
8 | public MyFileFilter(String shpPath){ |
||
9 | this.shpPath=shpPath;
|
||
10 | } |
||
11 | public boolean accept(File pathname) { |
||
12 | String strend=pathname.getAbsolutePath();
|
||
13 | strend=strend.substring(0,strend.length()-3); |
||
14 | String strshp=shpPath.substring(0, shpPath.length() - 3); |
||
15 | if (strend.equals(strshp)) {
|
||
16 | return true; |
||
17 | } |
||
18 | return false; |
||
19 | } |
||
20 | |||
21 | } |