diff src/goodjava/lucene/logging/LogFile.java @ 1508:86c5e7000ecf

lucene.backup checksum
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 16 May 2020 17:56:02 -0600
parents 9a2a2181a58f
children 117ce8645b7f
line wrap: on
line diff
--- a/src/goodjava/lucene/logging/LogFile.java	Sat May 16 12:33:41 2020 +0300
+++ b/src/goodjava/lucene/logging/LogFile.java	Sat May 16 17:56:02 2020 -0600
@@ -12,6 +12,7 @@
 import goodjava.logging.LoggerFactory;
 import goodjava.io.FixedLengthInputStream;
 import goodjava.io.BufferedInputStream;
+import goodjava.io.IoUtils;
 
 
 public class LogFile {
@@ -65,6 +66,10 @@
 		return new LogInputStream(in);
 	}
 
+	public long checksum() throws IOException {
+		return IoUtils.checksum(input());
+	}
+
 	static final int TYPE_NULL = 0;
 	static final int TYPE_STRING = 1;
 	static final int TYPE_INT = 2;