Interface FileWrapper

  • All Known Implementing Classes:
    BaseFileWrapper, DiskFileWrapper

    public interface FileWrapper
    Wrapper around files that provide some basic information about the file. This allows us to work with both files on disk and in the BASE file system without handling special cases.
    Since:
    2.16
    Author:
    Nicklas
    Last modified
    $Date: 2010-08-03 11:21:30 +0200 (ti, 03 aug 2010) $
    • Method Detail

      • getName

        String getName()
        Get the name of the file.
        Returns:
        The name of the file, or null if not known
      • getSize

        long getSize()
        Get the size of the file.
        Returns:
        The size of the file, or -1 if not known
      • getCharacterSet

        String getCharacterSet()
        Get the character set used in the file.
        Returns:
        The character set, or null if not known or if the file is binary file
      • getInputStream

        InputStream getInputStream()
                            throws IOException
        Get an input stream that reads data from the file. Multiple calls to this method should normally result in multiple independent streams.
        Returns:
        An input stream
        Throws:
        IOException