Linked Questions

21 votes
2 answers
54k views

My background is .net, I'm fairly new to Java. I'm doing some work for our company's java team and the architect needs me to implement a method that takes an InputStream (java.io) object. In order ...
Lee Warner's user avatar
  • 2,603
13 votes
3 answers
49k views

ChannelBufferInputStream responseStream = (ChannelBufferInputStream) response.getBodyAsStream(); ArrayList<Byte> arrayList = new ArrayList<Byte>(); try { while (responseStream....
sissonb's user avatar
  • 3,790
-1 votes
1 answer
18k views

I am trying to convert an InputStream into a byte array to write it in a file, to generate a PDF. I have a File type with the url of a PDF, and with that, i have the inputStream of that. File ...
Angel Gonzalez Pena's user avatar
-1 votes
2 answers
4k views

byte[] b = new byte[10000]; len = readerIn.read(b); // InputStream My byte size is 10000, but the InputStream size may be lower or higher. Is there a way to read only the size of data that comes into ...
bbbot's user avatar
  • 23
-4 votes
2 answers
1k views

Trying to get bytes data from inputstream as shown in the below code. But, the bytes variable is null. What might be the reason? FYI- Image is available in the given uri, ...
djac's user avatar
  • 197
0 votes
1 answer
886 views

I have a strange issue: My dropwizard API processes the uploaded file and saves it as a JPEG image the uploaded file is read as an InputStream. FormDataBodyPart fileBody is read using @...
Manohar's user avatar
  • 35
0 votes
0 answers
245 views

I want to build simple servlet that accepts single file via post and write it somewhere. The curl will be like: $ curl -X POST -H "Content-Type: Application/Octet-Stream" --data-binary @thrw.pdf http:...
Bagus Tesa's user avatar
  • 1,715
0 votes
0 answers
119 views

Can't find out how to add a profile picture to client when regstration in data base in web application using JSP, Registration Servlet and Entity Manager JPA for Mysql. For now I did this: ...
K.mady's user avatar
  • 13
847 votes
15 answers
684k views

I'm attempting to compile Java 1.4 code that was created by IBM's WSDL2Java on Java5 without recreating the stubs and saw this error in Eclipse. I'm under the assumption that the stubs generated ...
sal's user avatar
  • 23.7k
172 votes
11 answers
167k views

How do you read the same inputstream twice? Is it possible to copy it somehow? I need to get a image from web, save it locally and then return the saved image. I just thought it would be faster to use ...
EsbenG's user avatar
  • 28.2k
141 votes
8 answers
327k views

I have a blob column in my database table, for which I have to use byte[] in my Java program as a mapping and to use this data I have to convert it to InputStream or OutputStream. But I don't know ...
GuruKulki's user avatar
  • 26.6k
31 votes
6 answers
91k views

I try to do file upload from a JavaScript client to a JAX-RS Java server. I use the following REST upload function on my server: @POST @Produces('application/json') UploadDto upload( @...
Michael's user avatar
  • 33.5k
27 votes
12 answers
32k views

I would like to compress an input stream in java using Gzip compression. Let's say we have an input stream (1GB of data..) not compressed. I want as a result a compressed inputstream from the source :...
Fabien's user avatar
  • 975
32 votes
4 answers
45k views

Is it possible to download S3object in Java directly into memory and get it removed when i'm done with the task?
Manisha 's user avatar
28 votes
4 answers
68k views

Not sure about how I am supposed to do this. Any help would be appreciated
user398371's user avatar

15 30 50 per page
1
2 3 4 5
7