public static void writeFile(byte[][] buffer, String fileToBeSaved) throws TikaException {
        if (buffer == null || fileToBeSaved == null || ChmCommons.isEmpty(fileToBeSaved)) {
            return;
        }
        try (FileOutputStream output = new FileOutputStream(fileToBeSaved)) {
            for (byte[] bufferEntry : buffer) {
                output.write(bufferEntry);
            }
        } catch (FileNotFoundException e) {
            throw new TikaException(e.getMessage());
        } catch (IOException e) {
            LOG.warn("problem writing tmp file", e);
        }
    }
Writes byte[][] to the file

@param buffer
@param fileToBeSaved file name
@throws TikaException
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/chm/ChmCommons.java