FileDocCategorySizeDatePackage
FtpURLInputStream.javaAPI DocAndroid 1.5 API2376Wed May 06 22:41:04 BST 2009org.apache.harmony.luni.internal.net.www.protocol.ftp

FtpURLInputStream

public class FtpURLInputStream extends InputStream
This class associates a given inputStream with a control socket. This ensures the control socket Object stays live while the stream is in use

Fields Summary
private InputStream
is
private Socket
controlSocket
Constructors Summary
public FtpURLInputStream(InputStream is, Socket controlSocket)

        this.is = is;
        this.controlSocket = controlSocket;
    
Methods Summary
public intavailable()

        return is.available();
    
public voidclose()

        try {
            is.close();
        } catch (Exception e) {
            // ignored
        }
        try {
            controlSocket.close();
        } catch (Exception e) {
            // ignored
        }
    
public synchronized voidmark(int limit)

        is.mark(limit);
    
public booleanmarkSupported()

        return is.markSupported();
    
public intread()

        return is.read();
    
public intread(byte[] buf, int off, int nbytes)

        return is.read(buf, off, nbytes);
    
public synchronized voidreset()

        is.reset();
    
public longskip(long sbytes)

        return is.skip(sbytes);