users@jersey.java.net

[Jersey] Re: how to upload large file more then 2 gb using jersey?

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Tue, 14 Feb 2012 18:05:32 +0100

Hello,

can you please share more details? How are you processing incoming data?

InputStream should be practically infinite, if you are not
caching/buffering it, so something like code above should work:

         @POST
         public void post(InputStream in) throws IOException {
             int read;
             final byte[] data = new byte[2048]; // you might choose
different bugger size.
             while ((read = in.read(data)) != -1) {
                     // handle read data
             }
         }

Pavel

On 2/14/12 11:49 AM, Vipin.nemade wrote:
> Hi Every Buddy,
> I am developing some storage domain application in which I am able to less
> then 2 gb file. But my project requirement is upload large size file. Please
> help me to achieve this.
>
> Thanks and Regards
> Vipin nemade
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/how-to-upload-large-file-more-then-2-gb-using-jersey-tp7283481p7283481.html
> Sent from the Jersey mailing list archive at Nabble.com.
>