Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.enterprisedt.net.ftp
Class AbstractFTPInputStream

    java.lang.Object
      java.io.InputStream
          com.enterprisedt.net.ftp.FileTransferInputStream
              com.enterprisedt.net.ftp.AbstractFTPInputStream

All Implemented Interfaces:
  java.io.Closeable

    public abstract class AbstractFTPInputStream

extends FileTransferInputStream

Represents an input stream of bytes coming from an FTP server, permitting the user to download a file by reading the stream. It can only be used for one download, i.e. after the stream is closed it cannot be reopened.

Version:
  $Revision: 1.2 $
Author:
  Bruce Blackshaw

Field Summary
`protected FTPClient` | `client` The client being used to perform the transfer
`protected java.io.BufferedInputStream` | `in` The input stream from the FTP server

Fields inherited from class com.enterprisedt.net.ftp.FileTransferInputStream
`closed, monitor, monitorCount, monitorEx, monitorInterval, pos, remoteFile, started`

Constructor Summary
`AbstractFTPInputStream(FTPClient client, java.lang.String remoteFile)` Constructor.

Method Summary
`void` | `close()` Closes this input stream and releases any system resources associated with the stream.
`protected void` | `start()`
`protected void` | `start(boolean firstTime)` Start the transfer

Methods inherited from class com.enterprisedt.net.ftp.FileTransferInputStream
`checkMonitor, getRemoteFile, setMonitor`

Methods inherited from class java.io.InputStream
`available, mark, markSupported, read, read, read, reset, skip`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### client

    protected FTPClient client

  The client being used to perform the transfer

### in

    protected java.io.BufferedInputStream in

  The input stream from the FTP server

Constructor Detail

### AbstractFTPInputStream

    public AbstractFTPInputStream(FTPClient client,
                                  java.lang.String remoteFile)
                           throws java.io.IOException,
                                  FTPException

  Constructor. A connected FTPClient instance must be supplied. This sets up the download. If an offset > 0 is supplied, must be a binary transfer.

  Parameters:
    `client` - connected FTPClient instance
    `remoteFile` - remote file
  Throws:
    `java.io.IOException`
    `FTPException`

Method Detail

### start

    protected void start()
                  throws java.io.IOException

  Throws:
    `java.io.IOException`

### start

    protected void start(boolean firstTime)
                  throws java.io.IOException

  Start the transfer

  Throws:
    `java.io.IOException`

### close

    public void close()
               throws java.io.IOException

  Closes this input stream and releases any system resources associated with the stream. This must be called before any other operations are initiated on the FTPClient.

  Specified by:
    `close` in interface `java.io.Closeable`
  Overrides:
    `close` in class `java.io.InputStream`
  Throws:
    `java.io.IOException` - if an I/O error occurs.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2001-2007 Enterprise Distributed Technologies Ltd. All Rights Reserved.