Code example for FileEntity

0
                    System.out.println("Cannot read file " + file.getPath());
 
                } else { 
 
                    response.setStatusCode(HttpStatus.SC_OK);
                    FileEntity body = new FileEntity(file, "text/html");
                    response.setEntity(body);
                    System.out.println("Serving file " + file.getPath());
 
                } 
            } 
        } 
         
        private String thriftRequest(byte[] input){
            try{ 
             
                //Input 
                TMemoryBuffer inbuffer = new TMemoryBuffer(input.length);           
                inbuffer.write(input);              
                TProtocol  inprotocol   = new TJSONProtocol(inbuffer);