Class DataFile

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class DataFile
    extends java.lang.Object
    implements java.io.Closeable
    • Constructor Summary

      Constructors 
      Constructor Description
      DataFile​(java.io.File file)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      void close()  
      byte[] read​(int indexId, int archiveId, int sector, int size)  
      DataFileWriteResult write​(int indexId, int archiveId, byte[] compressedData)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DataFile

        public DataFile​(java.io.File file)
                 throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • clear

        public void clear()
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public byte[] read​(int indexId,
                           int archiveId,
                           int sector,
                           int size)
                    throws java.io.IOException
        Parameters:
        indexId - expected index of archive of contents being read
        archiveId - expected archive of contents being read
        sector - sector to start reading at
        size - size of file
        Returns:
        Throws:
        java.io.IOException
      • write

        public DataFileWriteResult write​(int indexId,
                                         int archiveId,
                                         byte[] compressedData)
                                  throws java.io.IOException
        Throws:
        java.io.IOException