public static function createFromBinaryData($data, $contentType = false)
    {
        if (\is_resource($data)) {
            $data = \stream_get_contents($data);
        }

        return new self($data, \base64_encode($data), $contentType);
    }