Class PropertyResolverReader

java.lang.Object
java.io.Reader
org.exoplatform.commons.utils.PropertyResolverReader
All Implemented Interfaces:
Closeable, AutoCloseable, Readable

public class PropertyResolverReader extends Reader
  • Constructor Details

    • PropertyResolverReader

      public PropertyResolverReader(Reader delegate)
    • PropertyResolverReader

      public PropertyResolverReader(Reader delegate, int bufferSize)
  • Method Details

    • read

      public int read(char[] cbuf, int off, int len) throws IOException
      Specified by:
      read in class Reader
      Throws:
      IOException
    • resolve

      protected String resolve(String name)
      Resolves a property value, this method is called during the stream analysis. When the returned value is null, the property declaration will be read by the client (i.e ${a} will be read as ${a}).
      Parameters:
      name - the property name
      Returns:
      the property value
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in class Reader
      Throws:
      IOException