uk.me.parabola.mkgmap.osmstyle
Class DirectoryFileLoader

java.lang.Object
  extended by uk.me.parabola.mkgmap.osmstyle.StyleFileLoader
      extended by uk.me.parabola.mkgmap.osmstyle.DirectoryFileLoader

public class DirectoryFileLoader
extends StyleFileLoader

Deal with a style that is contained in a directory.

Author:
Steve Ratcliffe

Constructor Summary
DirectoryFileLoader(java.io.File dir)
          Create a loader given the directory as a File object.
 
Method Summary
 void close()
          Nothing needs doing in this case.
 java.lang.String[] list()
          List the names of the styles that are contained in this loader.
 java.io.Reader open(java.lang.String filename)
          Open the specified file in the style definition.
 
Methods inherited from class uk.me.parabola.mkgmap.osmstyle.StyleFileLoader
createStyleLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryFileLoader

public DirectoryFileLoader(java.io.File dir)
Create a loader given the directory as a File object.

Parameters:
dir - The directory containing the style files.
Method Detail

open

public java.io.Reader open(java.lang.String filename)
                    throws java.io.FileNotFoundException
Open the specified file in the style definition.

Specified by:
open in class StyleFileLoader
Parameters:
filename - The name of the file in the style.
Returns:
An open file reader for the file.
Throws:
java.io.FileNotFoundException - When the file can't be opened.

close

public void close()
Nothing needs doing in this case.

Specified by:
close in class StyleFileLoader

list

public java.lang.String[] list()
Description copied from class: StyleFileLoader
List the names of the styles that are contained in this loader.

Specified by:
list in class StyleFileLoader
Returns:
An array of style names.