Mercurial Hosting > luan
diff src/luan/modules/IoLuan.java @ 1508:86c5e7000ecf
lucene.backup checksum
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sat, 16 May 2020 17:56:02 -0600 |
parents | e66e3d50b289 |
children | 0ba144491a42 |
line wrap: on
line diff
--- a/src/luan/modules/IoLuan.java Sat May 16 12:33:41 2020 +0300 +++ b/src/luan/modules/IoLuan.java Sat May 16 17:56:02 2020 -0600 @@ -205,14 +205,7 @@ } public long checksum() throws IOException, LuanException { - long cs = 0; - InputStream in = new BufferedInputStream(inputStream()); - int c; - while( (c=in.read()) != -1 ) { - cs = 31 * cs + c; - } - in.close(); - return cs; + return IoUtils.checksum( new BufferedInputStream(inputStream()) ); } public String charset() {