Spring web large response

there will be an issue normally with http server response if the data size is above 2GB.

This is a limitation due to the int size on jvm is max 2147483648, which is the type being used for byte[] normally, hence the data size limit ~2GB bytes.

the solution is instead of respond with a one size object, it could stream the data back.

Something like

above would then stream back 70M+ data for example:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s