One of my attempts is to store an outputstream in it, but i dont know how, I know how to make the inverse of it.
Joined: Aug 07, 2007
The ByteArrayOutputStream class is an output stream that outputs to a byte array. Are you saying you have a different type of output stream and you want to send the data written to it to a byte array, if so what type of output stream do you have?
Can you explain exactly what you are trying to achieve.
Joined: Oct 13, 2010
This is the scenario, I am using lowagie librarie to generate pdf, for that, I have to pass an outputstream to it, but I dont want to save the file in the server machine, I want to provide it for instant download, that is why I am trying to convert the outputstream to a byte array. This is the workaround along with my try:
with that kind of file.toString I am receiving the file broken, I want to know if there is a better way.
Ahh, now I understood what you were saying, indeed, that worked, but the file still comming corrupted, if I set it to a fileoutputstream as I did before specifying a path in local, it work perfectly. Now I have to find what may be breaking it.
btw, thanks a lot for the attention that you are providing me