Class ZipFileType


  • public class ZipFileType
    extends FileType
    TODO: ZipEntry may also be a "normal" FileType
    Version:
    $Revision: 305 $
    Author:
    $Author: $
    • Field Detail

      • zipentry

        protected java.util.zip.ZipEntry zipentry
      • entryName

        protected java.lang.String entryName
    • Method Detail

      • getInnerName

        public java.lang.String getInnerName()
        Returns the most inner name of the FileType. Will be overwritten in ZipFileType
        Overrides:
        getInnerName in class FileType
        Returns:
        the most inner name of a FileType.
      • getZipEntries

        public static java.util.zip.ZipEntry[] getZipEntries​(java.util.zip.ZipFile zip,
                                                             java.lang.String[] endings)
        Returns all files inside the zip ending with one of the given endings case insensitive
        Parameters:
        zip - a ZipFile to inspect
        endings - an array of valid file name endings.
        Returns:
        an array of valid zip file entries
      • createInputStream

        protected java.io.InputStream createInputStream()
                                                 throws java.io.IOException
        Description copied from class: FileType
        Creates an InputStream for the underlying file.
        Overrides:
        createInputStream in class FileType
        Returns:
        an InputStream of the underlying file.
        Throws:
        java.io.IOException - If the file cannot be opened for reading
        See Also:
        FileType.createInputStream()
      • createOutputStream

        protected java.io.OutputStream createOutputStream()
                                                   throws java.io.IOException
        Description copied from class: FileType
        Creates an OutputStream for the underlying file.
        Overrides:
        createOutputStream in class FileType
        Returns:
        an OutputStream of the underlying file.
        Throws:
        java.io.IOException - If the file cannot be opened for writing
      • checkConnection

        public FileType checkConnection()
                                 throws java.io.IOException
        Description copied from class: FileType
        Tests if an InputStream can be opened for this FileType.
        Overrides:
        checkConnection in class FileType
        Returns:
        this
        Throws:
        java.io.IOException - If the file cannot be opened for the required operation (reading or writing).
        See Also:
        FileType.checkConnection()