You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by wch2001 <wc...@hotmail.com> on 2009/01/13 03:32:28 UTC

thanks ur help,withe the zipoutputstream,

 with http://letmegooglethatforyou.com/?q=java+zip+files, I can get the
zipoutputstream, 

How can i export it ?

Need to use the following AbstractResourceStreamWriter , right ?

how can i override write method?

Sorry to ask so stupid question, thanks for help.

                        AbstractResourceStreamWriter writer = new
AbstractResourceStreamWriter() {

                            @Override
                            public void write(OutputStream arg0) {
                                throw new UnsupportedOperationException("Not
supported yet.");
                            }

                            @Override
                            public String getContentType() {
                                return "application/zip";
                            }
                        };
                        RequestCycle.get().setRequestTarget(new
ResourceStreamRequestTarget(writer,"test.zip"));         





Pills wrote:
> 
> Zipping data has absolutely nothing to do with wicket, this is a 
> separate concern, and this looks absolutely normal that nothing exists 
> in wicket for such a feature.
> 
> Separation of concerns is very usual on today's days.
> 
> Peter Ertl a écrit :
>> how is this wicket?
>>
>>
>> Am 12.01.2009 um 11:36 schrieb Michael Sparer:
>>
>>>
>>> http://www.google.com/search?&q=java+zip  ;-)
>>>
>>>
>>>
>>> wch2001 wrote:
>>>>
>>>>
>>>> thanks , Pills.
>>>>
>>>> How can  I zip it ?
>>>>
>>>> thanks
>>>>
>>>>
>>>>
>>>> Pills wrote:
>>>>>
>>>>> Zip them on the fly, then download the zip.
>>>>>
>>>>> wch2001 a écrit :
>>>>>> in the folder: c:/cw/adsmart, there are 3 files: aa.txt, bb.txt, 
>>>>>> cc.txt,
>>>>>>
>>>>>> how can i download it ? if it possible that  when clicking 
>>>>>> button/link
>>>>>> and
>>>>>> so on to download those 3 files?
>>>>>>
>>>>>> thanks
>>>>>>
>>>>>>
>>>>>>
>>>>>> PSkarthic wrote:
>>>>>>
>>>>>>> I am also a newbie but i will try
>>>>>>> could u be please more specific or elabrate
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>> -----
>>> Michael Sparer
>>> http://talk-on-tech.blogspot.com
>>> -- 
>>> View this message in context: 
>>> http://www.nabble.com/Help%2CHow-to-download-all-files-in-one-folder---tp21411355p21411973.html 
>>>
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Help%2CHow-to-download-all-files-in-one-folder---tp21411355p21428377.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: thanks ur help,withe the zipoutputstream,

Posted by wch2001 <wc...@hotmail.com>.

thanks , pills, it is ok to work


Pills wrote:
> 
> Just write your data to the OutputStream you receive as parameter.
> 
> But the zipping step (creating the ZipOutputStream, adding some crc 
> checks, etc) is not related to wicket at all. Maybe you should ask on 
> some other java list (this is part of java.util api)
> 
> wch2001 a écrit :
>>  with http://letmegooglethatforyou.com/?q=java+zip+files, I can get the
>> zipoutputstream, 
>>
>> How can i export it ?
>>
>> Need to use the following AbstractResourceStreamWriter , right ?
>>
>> how can i override write method?
>>
>> Sorry to ask so stupid question, thanks for help.
>>
>>                         AbstractResourceStreamWriter writer = new
>> AbstractResourceStreamWriter() {
>>
>>                             @Override
>>                             public void write(OutputStream arg0) {
>>                                 throw new
>> UnsupportedOperationException("Not
>> supported yet.");
>>                             }
>>
>>                             @Override
>>                             public String getContentType() {
>>                                 return "application/zip";
>>                             }
>>                         };
>>                         RequestCycle.get().setRequestTarget(new
>> ResourceStreamRequestTarget(writer,"test.zip"));         
>>
>>
>>
>>
>>
>> Pills wrote:
>>   
>>> Zipping data has absolutely nothing to do with wicket, this is a 
>>> separate concern, and this looks absolutely normal that nothing exists 
>>> in wicket for such a feature.
>>>
>>> Separation of concerns is very usual on today's days.
>>>
>>> Peter Ertl a écrit :
>>>     
>>>> how is this wicket?
>>>>
>>>>
>>>> Am 12.01.2009 um 11:36 schrieb Michael Sparer:
>>>>
>>>>       
>>>>> http://www.google.com/search?&q=java+zip  ;-)
>>>>>
>>>>>
>>>>>
>>>>> wch2001 wrote:
>>>>>         
>>>>>> thanks , Pills.
>>>>>>
>>>>>> How can  I zip it ?
>>>>>>
>>>>>> thanks
>>>>>>
>>>>>>
>>>>>>
>>>>>> Pills wrote:
>>>>>>           
>>>>>>> Zip them on the fly, then download the zip.
>>>>>>>
>>>>>>> wch2001 a écrit :
>>>>>>>             
>>>>>>>> in the folder: c:/cw/adsmart, there are 3 files: aa.txt, bb.txt, 
>>>>>>>> cc.txt,
>>>>>>>>
>>>>>>>> how can i download it ? if it possible that  when clicking 
>>>>>>>> button/link
>>>>>>>> and
>>>>>>>> so on to download those 3 files?
>>>>>>>>
>>>>>>>> thanks
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> PSkarthic wrote:
>>>>>>>>
>>>>>>>>               
>>>>>>>>> I am also a newbie but i will try
>>>>>>>>> could u be please more specific or elabrate
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                 
>>>>>>>>               
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>             
>>>>>>           
>>>>> -----
>>>>> Michael Sparer
>>>>> http://talk-on-tech.blogspot.com
>>>>> -- 
>>>>> View this message in context: 
>>>>> http://www.nabble.com/Help%2CHow-to-download-all-files-in-one-folder---tp21411355p21411973.html 
>>>>>
>>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>         
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>       
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Help%2CHow-to-download-all-files-in-one-folder---tp21411355p21448785.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: thanks ur help,withe the zipoutputstream,

Posted by Piller Sébastien <pi...@hmcrecord.ch>.
Just write your data to the OutputStream you receive as parameter.

But the zipping step (creating the ZipOutputStream, adding some crc 
checks, etc) is not related to wicket at all. Maybe you should ask on 
some other java list (this is part of java.util api)

wch2001 a écrit :
>  with http://letmegooglethatforyou.com/?q=java+zip+files, I can get the
> zipoutputstream, 
>
> How can i export it ?
>
> Need to use the following AbstractResourceStreamWriter , right ?
>
> how can i override write method?
>
> Sorry to ask so stupid question, thanks for help.
>
>                         AbstractResourceStreamWriter writer = new
> AbstractResourceStreamWriter() {
>
>                             @Override
>                             public void write(OutputStream arg0) {
>                                 throw new UnsupportedOperationException("Not
> supported yet.");
>                             }
>
>                             @Override
>                             public String getContentType() {
>                                 return "application/zip";
>                             }
>                         };
>                         RequestCycle.get().setRequestTarget(new
> ResourceStreamRequestTarget(writer,"test.zip"));         
>
>
>
>
>
> Pills wrote:
>   
>> Zipping data has absolutely nothing to do with wicket, this is a 
>> separate concern, and this looks absolutely normal that nothing exists 
>> in wicket for such a feature.
>>
>> Separation of concerns is very usual on today's days.
>>
>> Peter Ertl a écrit :
>>     
>>> how is this wicket?
>>>
>>>
>>> Am 12.01.2009 um 11:36 schrieb Michael Sparer:
>>>
>>>       
>>>> http://www.google.com/search?&q=java+zip  ;-)
>>>>
>>>>
>>>>
>>>> wch2001 wrote:
>>>>         
>>>>> thanks , Pills.
>>>>>
>>>>> How can  I zip it ?
>>>>>
>>>>> thanks
>>>>>
>>>>>
>>>>>
>>>>> Pills wrote:
>>>>>           
>>>>>> Zip them on the fly, then download the zip.
>>>>>>
>>>>>> wch2001 a écrit :
>>>>>>             
>>>>>>> in the folder: c:/cw/adsmart, there are 3 files: aa.txt, bb.txt, 
>>>>>>> cc.txt,
>>>>>>>
>>>>>>> how can i download it ? if it possible that  when clicking 
>>>>>>> button/link
>>>>>>> and
>>>>>>> so on to download those 3 files?
>>>>>>>
>>>>>>> thanks
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> PSkarthic wrote:
>>>>>>>
>>>>>>>               
>>>>>>>> I am also a newbie but i will try
>>>>>>>> could u be please more specific or elabrate
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                 
>>>>>>>               
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>             
>>>>>           
>>>> -----
>>>> Michael Sparer
>>>> http://talk-on-tech.blogspot.com
>>>> -- 
>>>> View this message in context: 
>>>> http://www.nabble.com/Help%2CHow-to-download-all-files-in-one-folder---tp21411355p21411973.html 
>>>>
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>         
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>>     
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: thanks ur help,withe the zipoutputstream,

Posted by Peter Ertl <pe...@gmx.org>.
just replace

>                                throw new  
> UnsupportedOperationException("Not supported yet.");

with your own code :-)


Am 13.01.2009 um 03:32 schrieb wch2001:

>
> with http://letmegooglethatforyou.com/?q=java+zip+files, I can get the
> zipoutputstream,
>
> How can i export it ?
>
> Need to use the following AbstractResourceStreamWriter , right ?
>
> how can i override write method?
>
> Sorry to ask so stupid question, thanks for help.
>
>                        AbstractResourceStreamWriter writer = new
> AbstractResourceStreamWriter() {
>
>                            @Override
>                            public void write(OutputStream arg0) {
>                                throw new  
> UnsupportedOperationException("Not
> supported yet.");
>                            }
>
>                            @Override
>                            public String getContentType() {
>                                return "application/zip";
>                            }
>                        };
>                        RequestCycle.get().setRequestTarget(new
> ResourceStreamRequestTarget(writer,"test.zip"));
>
>
>
>
>
> Pills wrote:
>>
>> Zipping data has absolutely nothing to do with wicket, this is a
>> separate concern, and this looks absolutely normal that nothing  
>> exists
>> in wicket for such a feature.
>>
>> Separation of concerns is very usual on today's days.
>>
>> Peter Ertl a écrit :
>>> how is this wicket?
>>>
>>>
>>> Am 12.01.2009 um 11:36 schrieb Michael Sparer:
>>>
>>>>
>>>> http://www.google.com/search?&q=java+zip  ;-)
>>>>
>>>>
>>>>
>>>> wch2001 wrote:
>>>>>
>>>>>
>>>>> thanks , Pills.
>>>>>
>>>>> How can  I zip it ?
>>>>>
>>>>> thanks
>>>>>
>>>>>
>>>>>
>>>>> Pills wrote:
>>>>>>
>>>>>> Zip them on the fly, then download the zip.
>>>>>>
>>>>>> wch2001 a écrit :
>>>>>>> in the folder: c:/cw/adsmart, there are 3 files: aa.txt, bb.txt,
>>>>>>> cc.txt,
>>>>>>>
>>>>>>> how can i download it ? if it possible that  when clicking
>>>>>>> button/link
>>>>>>> and
>>>>>>> so on to download those 3 files?
>>>>>>>
>>>>>>> thanks
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> PSkarthic wrote:
>>>>>>>
>>>>>>>> I am also a newbie but i will try
>>>>>>>> could u be please more specific or elabrate
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> -----
>>>> Michael Sparer
>>>> http://talk-on-tech.blogspot.com
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/Help%2CHow-to-download-all-files-in-one-folder---tp21411355p21411973.html
>>>>
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Help%2CHow-to-download-all-files-in-one-folder---tp21411355p21428377.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org