Offscreen rendering of a ViewPort

I have a second ViewPort with a Camera and an attached Scene (Node with a subset of all objects in the main view).

Rendered on screen all is fine. How can I render the second viewport to a BufferedImage instead?

I tried with the helper class from Stan (Offscreen rendering helper classes) but it only renderes a Node.

Well if your spatial is a node, you can just cast it to a node and then use the helper class.

if (spatial instanceof Node){
    Node n = (Node) spatial;
    helperClass.renderToBufferedImage(n); //Just for demonstration