私は2バイト配列を持っています。system.arraycopy を使用して連結しています。例外はスローされませんが、結果のストリームには 2 番目の配列データのみが表示されます
byte mainPdf[] = generatePDF(creditAppPDFurl, cifNumber,appRefId,pdfid1,appTransId);
byte supportingPdf[] = generateSupportingDocPDF();
byte[] destination = new byte[mainPdf.length + supportingPdf.length];
System.arraycopy(mainPdf, 0, destination, 0, mainPdf.length);
System.arraycopy(supportingPdf, 0, destination, mainPdf.length, supportingPdf.length);
pdfInputStreamData = new ByteArrayInputStream(destination);
pdfInputStreamData は、supportingPdf データのみを表示しています