Removed debug statement.
This commit is contained in:
parent
50535d4bc0
commit
e88c51c152
|
@ -58,7 +58,6 @@ public class ClusterIO {
|
||||||
public Cluster load(Path path, char[] password) throws Exception {
|
public Cluster load(Path path, char[] password) throws Exception {
|
||||||
try (var is = Files.newInputStream(path)) {
|
try (var is = Files.newInputStream(path)) {
|
||||||
int version = ByteUtils.readInt(is);
|
int version = ByteUtils.readInt(is);
|
||||||
System.out.println("File version: " + version);
|
|
||||||
if (version < FILE_VERSION) {
|
if (version < FILE_VERSION) {
|
||||||
System.err.println("Warning! Reading older file version: " + version);
|
System.err.println("Warning! Reading older file version: " + version);
|
||||||
}
|
}
|
||||||
|
@ -126,6 +125,9 @@ public class ClusterIO {
|
||||||
public Cluster loadUnencrypted(Path path) throws IOException {
|
public Cluster loadUnencrypted(Path path) throws IOException {
|
||||||
try (var is = Files.newInputStream(path)) {
|
try (var is = Files.newInputStream(path)) {
|
||||||
int version = ByteUtils.readInt(is);
|
int version = ByteUtils.readInt(is);
|
||||||
|
if (version < FILE_VERSION) {
|
||||||
|
System.err.println("Warning! Reading older file version: " + version);
|
||||||
|
}
|
||||||
int encryptionFlag = is.read();
|
int encryptionFlag = is.read();
|
||||||
if (encryptionFlag == 1) throw new IOException("File is encrypted.");
|
if (encryptionFlag == 1) throw new IOException("File is encrypted.");
|
||||||
return ClusterSerializer.readCluster(is);
|
return ClusterSerializer.readCluster(is);
|
||||||
|
|
Loading…
Reference in New Issue