Mercurial Hosting > luan
comparison src/goodjava/io/IoUtils.java @ 1508:86c5e7000ecf
lucene.backup checksum
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sat, 16 May 2020 17:56:02 -0600 |
parents | d80395468b4e |
children | 0ba144491a42 |
comparison
equal
deleted
inserted
replaced
1507:c8f4867fd083 | 1508:86c5e7000ecf |
---|---|
55 out.write(a,0,n); | 55 out.write(a,0,n); |
56 } | 56 } |
57 in.close(); | 57 in.close(); |
58 } | 58 } |
59 | 59 |
60 public static long checksum(InputStream in) throws IOException { | |
61 long cs = 0; | |
62 int c; | |
63 while( (c=in.read()) != -1 ) { | |
64 cs = 31 * cs + c; | |
65 } | |
66 in.close(); | |
67 return cs; | |
68 } | |
69 | |
60 | 70 |
61 static { | 71 static { |
62 // undo restrictions of modern scum | 72 // undo restrictions of modern scum |
63 Security.setProperty("jdk.tls.disabledAlgorithms","SSLv3, RC4, DES, MD5withRSA, DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC"); | 73 Security.setProperty("jdk.tls.disabledAlgorithms","SSLv3, RC4, DES, MD5withRSA, DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC"); |
64 } | 74 } |