org.jmythapi.utils
Class OpenSubtitlesHasher
java.lang.Object
org.jmythapi.utils.OpenSubtitlesHasher
public class OpenSubtitlesHasher
- extends Object
Hash code is based on Media Player Classic. In natural language it calculates: size + 64bit
checksum of the first and last 64k (even if they overlap because the file is smaller than
128k).
This method was copied from opensubtitles.org.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OpenSubtitlesHasher
public OpenSubtitlesHasher()
computeHash
public static String computeHash(File file)
throws IOException
- Throws:
IOException
computeHash
public static String computeHash(InputStream stream,
long length)
throws IOException
- Throws:
IOException
Copyright © 2008-2013. All Rights Reserved.