User Tools

Site Tools


A java class to get a compressed file from the server

Some guys often ask me to help them to get some files from the server, such as tomcat log. Everytime I must open ftp client to connect the server, download these file. The lazy man need a smart way to do this job. Now they can help themselves.

 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 public class ZGet {
     public void get(HttpServletRequest request, HttpServletResponse response, String filename) {
         try {
             // String fname = request.getParameter("xpath");
             fname = filename;
             File f = new File(fname);
             if (f.canRead()) {
                 response.setHeader("Location", f.getName());  
                 response.setHeader("Content-Disposition", "attachment; filename=" + f.getName() + ".gz");
                 get(new FileInputStream(filename), response.getOutputStream());
          } catch (Exception e) {
              // TODO Auto-generated catch block
      private void get(InputStream in, OutputStream out) throws IOException {
          if (in == null || out == null) {
          byte[] buffer = new byte[1024];
          int i = -1;
          GZIPOutputStream gzip = new GZIPOutputStream(out);
          while ((i = != -1) {
              gzip.write(buffer, 0, i);


, AXBLMHFZYBu, 2012/01/06 02:37

This is a rellay intelligent way to answer the question.

, 2019/03/27 01:58 QQQ

,, 2019/04/19 20:05 - Buy Amoxicillin Online <a href=“”>Amoxicillin 500 Mg</a>

,, 2019/04/19 21:22 - Amoxicillin 500mg Capsules <a href=“”>Amoxicillin 500mg Capsules</a>

, 2019/10/10 11:13

Garage, 26, is one <a href=>kd shoes</a> of the largest child, dell - garage in 2002, the dad announced over 07 years of career, finally handed over 40. 2% on threes report card. From a quite young age, Stephen about the shooting learned how to shoot for the feet of the get better at, when dad refused to consider him to the hornets teaching, Stephen will be pursed mouth, not because can't visit those big-name players, the old you happen to be, but because he also desire to be with my dad, to practice his shot.

At age 9, garage is of her own <a href=>stephen curry shoes</a> amateur league teams associated with players, only if the coach must outside shot collapse for the opponent's zone will always be sent. Recalled the yourself, garage proudly said: “when My spouse and i was a defense gurus, all start from presently there. ”

To go here we are at <a href=>curry shoes</a> the original text, if your garage near the baseball in midfield, people tend to overlook the most important thing: pool soccer ball skills. Sonya, thanks in order to his mother, then any 5 feet tall 3, cordial and some stubborn woman again as well, she was in secondary school played point guard, looking towards the volleyball after into the campus of Virginia technological, and meet the car port there's father. “If I dribble towards coast, I have to pick to shoot or go, it's my limit. “Dell mentioned, “people started for Stephen impression is all they can beautiful posture hit photographs, but before becoming any striker, he already was an improved control player, people have a tendency to ignore it. After their dribble shot, is I the most wonderful moments. Thanks to his or her mother. ”.

Tag: <a href=>kyrie irving shoes</a> <a href=>nike huarache</a> <a href=>Nike CR7</a> <a href=>kobe 10</a> <a href=>kyrie irving jersey</a> <a href=>puma fenty</a> <a href=>adidas yeezy</a> <a href=>air jordan shoes</a> <a href=>michael jordan shoes</a> <a href=>jordan retro</a> <a href=>kobe 11</a> <a href=>kyrie 4 halloween</a> <a href=>air jordan 32</a> <a href=>john wall shoes</a> <a href=>kobe shoes</a> <a href=>kobe bryant jersey</a> <a href=>adidas shoes</a> <a href=>birkenstock</a> <a href=>kyrie 4</a> <a href=>adidas zx flux</a> <a href=>adidas nmd shoes</a> <a href=>kyrie 2</a> <a href=>nike vapormax shoes</a> <a href=>nike zoom vaporfly elite</a> <a href=>ultra boost 4.0</a> <a href=>nike epic react</a> <a href=>yeezy boost</a> <a href=>under armour shoes</a> <a href=>Nike Soccer Cleats</a> <a href=>nike mercurial</a> <a href=>soldier 11</a> <a href=>lebron 14 shoes</a> <a href=>kd 11</a> <a href=>kyrie 4</a> <a href=>nike hyperdunk</a> <a href=>kyrie 3</a> <a href=>kd 10</a> <a href=>stephen curry jersey</a> <a href=>nike kyrie shoes</a> <a href=>lebron james shoes</a> <a href=>puma suede</a> <a href=>kyrie 4</a> <a href=>air max 270</a> <a href=>kyrie 3</a> <a href=>nike air max 97</a> <a href=>curry 2</a> <a href=>kevin durant shoes</a> <a href=>lebron james shoes</a> <a href=>kyrie 4 halloween</a> <a href=>ultra boost shoes</a> <a href=>nike air more uptempo</a> <a href=>kyrie shoes 3</a> <a href=>lebron shoes</a> <a href=>stephen curry shoes</a> <a href=>kyrie irving shoes</a> <a href=>adidas ultra boost uncaged</a> <a href=>curry 5</a> <a href=>nike air vapormax</a> <a href=>Nike Lebron James Shoes</a> <a href=>kd 11 shoes</a> <a href=>kevin durant jersey</a> <a href=>curry 5</a> <a href=>lebron soldier 10</a> <a href=>puma fenty slides</a> <a href=>nike air presto</a> <a href=>puma fenty</a> <a href=>nike zoom vaporfly</a> <a href=>kd shoes</a> <a href=>calvin klein</a> <a href=>kyrie 2 shoes</a> <a href=>kyrie 1</a> <a href=>curry 5</a> <a href=>yeezy boost</a> <a href=>kyrie 4</a> <a href=>vans sk8 hi</a> <a href=>puma rihanna creepers</a> <a href=>yeezy shoes</a> <a href=>nike pg 2</a> <a href=>mizuno running shoes</a> <a href=>asics gel kayano 23</a> <a href=>adidas soccer cleats</a> <a href=>lebron soldier 10</a> <a href=>paul george shoes</a> <a href=>lebron 14 shoes</a> <a href=>nike kobe shoes</a> <a href=>nike sock racer</a>

,, 2019/11/30 15:37 golden goose superstar , Converse 1970s , air max 270 sale , Golden Goose Hi Star , Golden Goose Slide , Lewis Hamilton Cap 2019 , golden goose uomo , Golden Goose V Star , golden goose ball star , converse shoes , golden goose v star , Moncler Outlet , Golden Goose Outlet , golden goose hi star , air max 270 outlet , Converse Leather Shoes , moncler women coats , Golden Goose Cyber Monday Deals , Lewis Hamilton Cap , Golden Goose Ball Star , Canada Goose Black Friday Sale , Moncler Men Jackets , adidas shoes , Golden Goose Superstar , golden goose superstar , Philippe Model Woman , Canada Goose Big Sales , Canada Goose Big Deal , Lewis Hamilton Hat , golden goose slide , golden goose francy , golden goose hi star , Converse Store , Moncler Outlet Online , Philippe Model Shoes , Sport Shoes , Golden Goose Ball Star , golden goose starter , Golden Goose Outlet , Converse Outlet , Converse Low Top , Moncler Cyber Monday Deals , Golden Goose Sale , Air Jordan Big Deal , golden goose mid star , Golden Goose Outlet , Converse Seasonal Color , Golden Goose V Star , Golden Goose , Philippe Model Sneakers , golden goose ball star , Jordan Cyber Monday Deals , Golden Goose Sneakers , Yeezy Boost Cyber Monday Deals , Mercedes Lewis Hamilton Cap , Golden Goose Hi Star , Philippe Model , Golden Goose , Air Jordan 1 Black Friday , Golden Goose Sneakers Outlet , golden goose francy , Mercedes Lewis Hamilton Hat , Moncler Black Friday Sale , Golden Goose Francy , Golden Goose Francy , golden goose v star , vans shoes , Converse Shoes , moncler women jackets , Yeezy Boost , Sport Shoes Outlet , Yeezy Boost Black Friday Sale , Golden Goose , Air Jordan Big Sales , Golden Goose Starter , Golden Goose Big Sales , golden goose slide , Moncler Women Coats , Sport Shoes Sale , Moncler Men Coats , Golden Goose Mid Star , golden goose starter , Mercedes Lewis Hamilton Caps , moncler men jackets , Air Jordan 1 , Golden Goose Hi Star , Golden Goose Sneakers , Golden Goose Sale , Golden Goose Sale , moncler women vests , Golden Goose Sale , Golden Goose , Lewis Hamilton Cap Collection , Golden Goose Shoes , golden goose v star , new balance shoes , air max 270 , Air Jordan 1 Meant To Fly , golden goose hi star , Golden Goose Slide , Moncler Big Sales , moncler men vests , Sport Shoes On Sale , Golden Goose Sneakers , Converse Outlet , golden goose starter , Golden Goose Superstar , Golden Goose , moncler men coats , Moncler Women Vests , Golden Goose Scarpe , Moncler Outlet Store , Mercedes Lewis Hamilton , air max 270 , Lewis Hamilton Caps , Golden Goose Black Friday Sale , Golden Goose Sneakers , nike shoes , nike air max 270 , golden goose hanami , Yeezy Boost Big Sales , Golden Goose Sneakers Sale , Air Jordan 1 Bloodline , golden goose francy , Golden Goose Starter , Golden Goose Starter , golden goose superstar , puma shoes , lewis hamilton hat , golden goose mid star , Jordan Black Friday Sale , golden goose slide , moncler accessories , Golden Goose Saldi , Canada Goose Cyber Monday Deals , Golden Goose Mid Star , Golden Goose Sneakers , golden goose mid star , Golden Goose Sneakers , Golden Goose Francy , air jordan shoes , Jordan Black Friday Sales , Golden Goose Outlet , cheap air max 270 , mercedes lewis hamilton hats , Converse Monochrome , Golden Goose , Converse High Top , Golden Goose Hanami , Mercedes F1 Cap , Moncler Big Deal , Moncler Big Deals , Air Jordan 1 55088-062 , mercedes f1 hat , Golden Goose Mid Star , yeezy boost , Philippe Model Sale , Philippe Model Man , golden goose donna , Golden Goose Slide , Moncler Men Vests , Golden Goose Big Deal , Moncler Women Jackets , Yeezy Boost Big Deal , Golden Goose Superstar ,

Enter your comment. Wiki syntax is allowed:
mirnshi/a_java_class_to_get_a_compressed_file_from_the_server.txt · Last modified: 2009/12/19 05:22 by mirnshi