private void extractHeaderOutput(InputStream stream, Metadata metadata, String prefix)
            throws IOException {
        try (BufferedReader reader = new BufferedReader(new InputStreamReader(stream, UTF_8))) {
            String line = reader.readLine();
            String[] firstLine = line.split(" ");
            String frames = firstLine[0];
            String vecSize = firstLine[1];

            if (prefix == null) {
                prefix = "";
            }
            metadata.add(prefix + "_frames", frames);
            metadata.add(prefix + "_vecSize", vecSize);
        }
    }
Reads the contents of the given stream and write it to the given XHTML
content handler. The stream is closed once fully processed.

@param stream     Stream where is the result of ocr
@param xhtml      XHTML content handler
@param tableTitle The name of the matrix/table to display.
@param frames     Number of frames read from the video.
@param vecSize    Size of the OF or HOG vector.
@throws SAXException if the XHTML SAX events could not be handled
@throws IOException  if an input error occurred
tika-parsers/tika-parsers-ml/tika-parser-advancedmedia-module/src/main/java/org/apache/tika/parser/pot/PooledTimeSeriesParser.java