Class ResourceManager

java.lang.Object
org.tentackle.buildsupport.ResourceManager

public class ResourceManager extends Object
A manager for resources.
Author:
harald
  • Constructor Details

    • ResourceManager

      public ResourceManager(File location)
      Creates a resource manager.
      Parameters:
      location - the resource location
  • Method Details

    • getResourceNames

      public Set<String> getResourceNames()
      Gets the resource names.
      Returns:
      the names, never null
    • getLocation

      public File getLocation()
      Gets the resource location.
      Returns:
      the location
    • getWriter

      public PrintWriter getWriter(String name) throws IOException
      Gets the writer.
      Parameters:
      name - the writer's name
      Returns:
      the writer
      Throws:
      IOException - if writer could not be created
    • getReader

      public Reader getReader(String name) throws IOException
      Gets the reader.
      Parameters:
      name - the reader's name
      Returns:
      the reader
      Throws:
      IOException - if reader could not be created
    • exists

      public boolean exists(String name)
      Returns whether given resource file exists.
      Parameters:
      name - the file;s name
      Returns:
      true if exists
    • close

      public void close() throws IOException
      Closes all resources.
      Throws:
      IOException - if closing a resource failed