mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-26 01:05:38 +00:00
#11 jdk11 support
This commit is contained in:
parent
248f460500
commit
70149817bf
17 changed files with 391 additions and 149 deletions
|
|
@ -28,6 +28,7 @@ import java.io.File;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.security.DigestInputStream;
|
||||
|
|
@ -226,6 +227,8 @@ public class InputFactory {
|
|||
byte[] hash = digest.digest();
|
||||
log.debug("Generated hashcode for {} is {}", name, DatatypeConverter.printHexBinary(hash));
|
||||
out.flush();
|
||||
log.info(new String(out.toByteArray(), Charset.forName("utf8")).substring(0,
|
||||
out.toByteArray().length < 100 ? out.toByteArray().length : 100));
|
||||
return new Input(out.toByteArray(), name, hash, digest.getAlgorithm());
|
||||
} catch (IOException e) {
|
||||
throw new IllegalArgumentException(MESSAGE_OPEN_STREAM_ERROR + name, e);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue