Class AbstractFileCompleteCheck

    • Constructor Detail

      • AbstractFileCompleteCheck

        public AbstractFileCompleteCheck()
    • Method Detail

      • isComplete

        public abstract boolean isComplete​(byte[] buffer)
        Checks whether the byte buffer is complete.
        Parameters:
        buffer - the buffer to check
        Returns:
        true if complete
      • read

        protected byte[] read​(File file,
                              int pos,
                              int num)
                       throws IOException
        Reads the specified number of bytes from the file.
        Parameters:
        file - the file to read from
        pos - the starting position, -1 if from end of file
        num - the number of bytes to read
        Returns:
        the bytes
        Throws:
        IOException - if reading fails
      • isComplete

        public abstract boolean isComplete​(File file)
        Checks whether the file is complete.
        Parameters:
        file - the file to check
        Returns:
        true if complete