backport to java 8
This commit is contained in:
@@ -62,7 +62,11 @@ public class ZUGFeRDExporterFromPDFA implements IZUGFeRDExporter {
|
|||||||
|
|
||||||
private byte[] fileToByteArrayInputStream(String pdfFilename) throws IOException {
|
private byte[] fileToByteArrayInputStream(String pdfFilename) throws IOException {
|
||||||
FileInputStream fileInputStream = new FileInputStream(pdfFilename);
|
FileInputStream fileInputStream = new FileInputStream(pdfFilename);
|
||||||
return fileInputStream.readAllBytes();
|
fileInputStream.reset();
|
||||||
|
byte[] bytes = new byte[fileInputStream.available()];
|
||||||
|
DataInputStream dataInputStream = new DataInputStream(fileInputStream);
|
||||||
|
dataInputStream.readFully(bytes);
|
||||||
|
return bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
|||||||
Reference in New Issue
Block a user