|
39 | 39 | import java.security.MessageDigest; |
40 | 40 | import java.security.NoSuchAlgorithmException; |
41 | 41 |
|
42 | | -import org.apache.commons.io.input.BoundedInputStream; |
| 42 | +// import org.apache.commons.io.input.BoundedInputStream; |
43 | 43 | import org.slf4j.Logger; |
44 | 44 | import org.slf4j.LoggerFactory; |
45 | 45 |
|
@@ -166,8 +166,9 @@ public boolean initialize(InputStream effectiveTldDataStream) { |
166 | 166 | boolean inPrivateDomainSection = false; |
167 | 167 | try { |
168 | 168 | int linesRead = 0, rulesRead = 0; |
169 | | - BoundedInputStream isCounting = BoundedInputStream.builder().setInputStream(effectiveTldDataStream).get(); |
170 | | - InputStream is = isCounting; |
| 169 | + // BoundedInputStream isCounting = BoundedInputStream.builder().setInputStream(effectiveTldDataStream).get(); |
| 170 | + // InputStream is = isCounting; |
| 171 | + InputStream is = effectiveTldDataStream; |
171 | 172 | List<MessageDigest> digests = new ArrayList<>(); |
172 | 173 | try { |
173 | 174 | MessageDigest md5 = MessageDigest.getInstance("MD5"); |
@@ -208,8 +209,9 @@ public boolean initialize(InputStream effectiveTldDataStream) { |
208 | 209 | configured = true; |
209 | 210 |
|
210 | 211 | is.close(); |
211 | | - long bytesRead = isCounting.getCount(); |
212 | | - LOGGER.info("Successfully read public suffix list: {} bytes, {} lines, {} rules", bytesRead, linesRead, rulesRead); |
| 212 | + // long bytesRead = isCounting.getCount(); |
| 213 | + // LOGGER.info("Successfully read public suffix list: {} bytes, {} lines, {} rules", bytesRead, linesRead, rulesRead); |
| 214 | + LOGGER.info("Successfully read public suffix list: {} lines, {} rules", linesRead, rulesRead); |
213 | 215 | for (MessageDigest digest : digests) { |
214 | 216 | byte[] d = digest.digest(); |
215 | 217 | BigInteger bi = new BigInteger(1, d); |
|
0 commit comments