org.apache.hadoop.fs.ftp
Class FTPInputStream
java.lang.Object
  
java.io.InputStream
      
org.apache.hadoop.fs.FSInputStream
          
org.apache.hadoop.fs.ftp.FTPInputStream
- All Implemented Interfaces: 
 - Closeable, PositionedReadable, Seekable
 
public class FTPInputStream
- extends FSInputStream
 
 
| 
Method Summary | 
 void | 
close()
 
            | 
 long | 
getPos()
 
          Return the current offset from the start of the file | 
 void | 
mark(int readLimit)
 
            | 
 boolean | 
markSupported()
 
            | 
 int | 
read()
 
            | 
 int | 
read(byte[] buf,
     int off,
     int len)
 
            | 
 void | 
reset()
 
            | 
 void | 
seek(long pos)
 
          Seek to the given offset from the start of the file. | 
 boolean | 
seekToNewSource(long targetPos)
 
          Seeks a different copy of the data. | 
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
FTPInputStream
public FTPInputStream(InputStream stream,
                      org.apache.commons.net.ftp.FTPClient client,
                      FileSystem.Statistics stats)
getPos
public long getPos()
            throws IOException
- Description copied from class: 
FSInputStream 
- Return the current offset from the start of the file
- Specified by:
 getPos in interface Seekable- Specified by:
 getPos in class FSInputStream
 
- Throws:
 IOException
 
 
seek
public void seek(long pos)
          throws IOException
- Description copied from class: 
FSInputStream 
- Seek to the given offset from the start of the file.
 The next read() will be from that location.  Can't
 seek past the end of the file.
- Specified by:
 seek in interface Seekable- Specified by:
 seek in class FSInputStream
 
- Throws:
 IOException
 
 
seekToNewSource
public boolean seekToNewSource(long targetPos)
                        throws IOException
- Description copied from class: 
FSInputStream 
- Seeks a different copy of the data.  Returns true if 
 found a new source, false otherwise.
- Specified by:
 seekToNewSource in interface Seekable- Specified by:
 seekToNewSource in class FSInputStream
 
- Throws:
 IOException
 
 
read
public int read()
         throws IOException
- Specified by:
 read in class InputStream
 
- Throws:
 IOException
 
read
public int read(byte[] buf,
                int off,
                int len)
         throws IOException
- Overrides:
 read in class InputStream
 
- Throws:
 IOException
 
close
public void close()
           throws IOException
- Specified by:
 close in interface Closeable- Overrides:
 close in class InputStream
 
- Throws:
 IOException
 
markSupported
public boolean markSupported()
- Overrides:
 markSupported in class InputStream
 
 
mark
public void mark(int readLimit)
- Overrides:
 mark in class InputStream
 
 
reset
public void reset()
           throws IOException
- Overrides:
 reset in class InputStream
 
- Throws:
 IOException
 
Copyright © 2008 The Apache Software Foundation