[Jersey] limit on byte[] or InputStream parameters

From: Ronak Patel <>
Date: Sun, 26 Feb 2012 05:15:50 -0800 (PST)

Hi all,

I know that Jersey can handle byte[] and InputStream parameters and it's been working great.

However, I was wondering how Jersey would let me place a limit on the size of said byte[] or InputStream.

It's a serious security risk when a client can upload a 4 GB file and crash the JVM!!


Ronak Patel