import java.io.PrintStream;
import java.nio.charset.Charset;
import java.nio.file.DirectoryStream;
import java.io.PrintStream;
import java.nio.charset.Charset;
import java.nio.file.DirectoryStream;
*/
private DirH(byte[][] hashes, byte[][] fileNames, byte[] dirName) {
if (hashes.length != fileNames.length)
*/
private DirH(byte[][] hashes, byte[][] fileNames, byte[] dirName) {
if (hashes.length != fileNames.length)
hashSize = hashes[0].length;
for (int i = 0; i < hashes.length; i++) {
if (hashes[i].length != hashSize)
hashSize = hashes[0].length;
for (int i = 0; i < hashes.length; i++) {
if (hashes[i].length != hashSize)
}
byte[][] hashes = hs.toArray(new byte[hs.size()][]);
return new DirH(hashes, fileNames, dir.toString().getBytes(charset));
}
byte[][] hashes = hs.toArray(new byte[hs.size()][]);
return new DirH(hashes, fileNames, dir.toString().getBytes(charset));
- } catch (Exception e) {
- throw new UtilsException("Cannot digest " + dir, e);
+ } catch (IOException e) {
+ throw new RuntimeException("Cannot digest " + dir, e);