@Override
    public InputStream asStream() {
        return new ByteArrayInputStream(bytes);
    }
Creates a new ByteArrayResource which provides access to the given byte
array. Changes to the given byte array will affect this resource even
after the resource is created. Changing the byte array while an input
stream from this resource is in use has undefined behavior.

@param mimetype
    The mimetype of the resource.

@param bytes
    The bytes that this resource should contain.
guacamole/src/main/java/org/apache/guacamole/resource/ByteArrayResource.java