Added the option to print the infos about a TMD to any PrintStream

This commit is contained in:
Maschell 2018-12-06 15:34:40 +01:00
parent 4c121ed959
commit 70db0b7fd9

View File

@ -246,12 +246,17 @@ public final class TMD {
}
public void printContents() {
printContents(System.out);
}
public void printContents(PrintStream out) {
long totalSize = 0;
for (Content c : contentToIndex.values()) {
totalSize += c.getEncryptedFileSize();
System.out.println(c);
out.println(c);
}
out.println("Total size: " + totalSize);
}
System.out.println("Total size: " + totalSize);
@Override
public String toString() {