Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/flexstor/common/io/xfile/ftp/FtpReader.java


1   /*
2    * FtpReader.java
3    *
4    * Copyright $Date: 2003/08/11 02:22:47 $ FLEXSTOR.net Inc.
5    *
6    * This work is licensed for use and distribution under license terms found at
7    * http://www.flexstor.org/license.html
8    *
9    */
10  
11  package com.flexstor.common.io.xfile.ftp;
12  
13  import java.io.BufferedReader;
14  import java.io.IOException;
15  import java.io.Reader;
16  
17  public class FtpReader extends BufferedReader
18  {
19  
20    private FtpSession m_client;
21  
22    FtpReader(Reader in, FtpSession client)
23      throws IOException
24    {
25      super(in);
26      m_client = client;
27      
28      while (!in.ready()) 
29      {
30          //System.out.println("Reader going to sleep..");
31        try 
32        { 
33            Thread.sleep(50L); 
34        }
35        catch (InterruptedException exc) 
36        {
37        }
38      }
39    }
40  
41    public void close() 
42      throws IOException
43      {
44        super.close();
45        m_client.closeTransferSocket();
46      }
47  
48    
49  }