/**
* File length in bytes.
*/
- private long fileLength;
+ private long fileLength = -1;
private transient boolean metaInfoVerified;
public AbstractFile(final File parentDirectory, final String fileName)
- throws IOException {
+ throws Exception {
this.fileName = fileName;
ensureFileMetainfoIsUpToDate(parentDirectory);
}
* @return <code>true</code> if file metadata was updated.
*/
public boolean ensureFileMetainfoIsUpToDate(final File parentDirectory)
- throws IOException {
+ throws Exception {
if (!isMetainfoUpToDate(parentDirectory)) {
fileLength = getFile(parentDirectory).length();
updateFileMetainfo(parentDirectory);
}
protected abstract void updateFileMetainfo(final File parentDirectory)
- throws IOException;
+ throws Exception;
}