public InputStream data() {
        InputStream aggregate = new SequenceInputStream(new Enumeration<>() {
            final int j = streams.size();
            int i = -1;
            @Override public boolean hasMoreElements() { return i < j; }
            @Override public InputStream nextElement() { return ++i < j ? streams.get(i).get() : i == j ? end() : null; }
        });
        try {
            if (aggregate.skip(2) != 2)// This should never happen, as the first stream is a ByteArrayInputStream.
                throw new IllegalStateException("Failed skipping extraneous bytes.");
        }
        catch (IOException e) { // This should never happen, as the first stream is a ByteArrayInputStream;
            throw new IllegalStateException("Failed skipping extraneous bytes.", e);
        }
        return new BufferedInputStream(aggregate);
    }
Returns an input stream which is an aggregate of all current parts in this, plus an end marker.
hosted-api/src/main/java/ai/vespa/hosted/api/MultiPartStreamer.java