Class ArchiveFileV1

    • Constructor Detail

      • ArchiveFileV1

        public ArchiveFileV1​(java.lang.String archiveName,
                             java.io.RandomAccessFile rf)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • ArchiveFileV1

        public ArchiveFileV1​(java.lang.String archiveName)
                      throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • readFileTable

        protected void readFileTable()
                              throws java.io.IOException
        read the stream table from the archive file. the stream table is in the begining of the file, it contains: long: stream section postiton, always zero. long: entry number. followed by entries in the archive, each entry contains: utf8: stream name. long[2]: start offset, length.
        Throws:
        java.io.IOException
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface IArchiveFile
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface IArchiveFile
        Throws:
        java.io.IOException
      • createEntry

        public ArchiveEntry createEntry​(java.lang.String name)
                                 throws java.io.IOException
        Specified by:
        createEntry in interface IArchiveFile
        Throws:
        java.io.IOException
      • exists

        public boolean exists​(java.lang.String name)
        Specified by:
        exists in interface IArchiveFile
      • flush

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface IArchiveFile
        Throws:
        java.io.IOException
      • openEntry

        public ArchiveEntry openEntry​(java.lang.String name)
                               throws java.io.IOException
        Specified by:
        openEntry in interface IArchiveFile
        Throws:
        java.io.IOException
      • listEntries

        public java.util.List<java.lang.String> listEntries​(java.lang.String namePattern)
        Specified by:
        listEntries in interface IArchiveFile
      • refresh

        public void refresh()
                     throws java.io.IOException
        Specified by:
        refresh in interface IArchiveFile
        Throws:
        java.io.IOException
      • removeEntry

        public boolean removeEntry​(java.lang.String name)
                            throws java.io.IOException
        Specified by:
        removeEntry in interface IArchiveFile
        Throws:
        java.io.IOException
      • lockEntry

        public java.lang.Object lockEntry​(java.lang.String stream)
                                   throws java.io.IOException
        Specified by:
        lockEntry in interface IArchiveFile
        Throws:
        java.io.IOException
      • unlockEntry

        public void unlockEntry​(java.lang.Object locker)
                         throws java.io.IOException
        Specified by:
        unlockEntry in interface IArchiveFile
        Throws:
        java.io.IOException
      • save

        public void save()
                  throws java.io.IOException
        Specified by:
        save in interface IArchiveFile
        Throws:
        java.io.IOException