Hi all,
try this for example:
public InputStream getInputStream() throws ParseException,
UnsupportedEncodingException {
StringBuffer sb = new StringBuffer("blablabla")
....
return new ByteArrayInputStream(sb.toString().getBytes("windows-1250"));
}
Best greetings,
Paweł Wielgus.
2010/9/16 Tommy Pham <[email protected]>:
>
>> -----Original Message-----
>> From: [email protected] [mailto:[email protected]]
>> Sent: Wednesday, September 15, 2010 9:23 PM
>> To: Struts Users Mailing List
>> Subject: Re: How to download a file without creating it on a server
>>
>> Hi Dave and Allen,
>>
>> Thank you for quick reply.
>>
>> Frankly speaking, I'm not familiarity with using stream and could not come
>> up with some ideas.
>>
>> When I coded with java.io.PipedInputStream/PipedOutputStream
>> like follwoing, I could download an empty file with IllegalStateException.
>>
>> If anyone give an example how to code,I will really appreciate.
>>
>> Thanks.
>>
>>
>
> IIRC, Struts uses the Apache Commons FileUpload
> http://commons.apache.org/fileupload/.
> You could read more about the Streaming API with examples in the provided
> link.
>
> Regards,
> Tommy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]