Hello,

I change some code in the server side and debugged it.

code:
/***********************

 public FileRepresentation receive(Representation  file){                       
        
                         try {
                        
                                
                                
                                InputStream is = file.getStream();
                                FileOutputStream fo = new FileOutputStream(new 
                                                  File("/usr/temp/file2.txt"));
                                
                                byte[] b = new byte[1024];
                                while(is.read(b)>=0){
                                        fo.write(b);
                                         b = new byte[1024];
                                         fo.flush();
                                }
                                
                                is.close();
                                fo.close();
                        } catch (FileNotFoundException e) {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
                        } catch (IOException e) {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
                        }
                return null;
         }

**********************/

it paused at the is.read(b)>=0 place.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2684328

Reply via email to