java.io.Closeable, java.lang.AutoCloseable, PositionedReadable, Seekable@Private @Unstable public class FTPInputStream extends FSInputStream
| Constructor | Description |
|---|---|
FTPInputStream(java.io.InputStream stream,
org.apache.commons.net.ftp.FTPClient client,
FileSystem.Statistics stats) |
| Modifier and Type | Method | Description |
|---|---|---|
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.
|
read, readFully, readFully, toString, validatePositionedReadArgsavailable, nullInputStream, read, readAllBytes, readNBytes, readNBytes, skip, transferToclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitmaxReadSizeForVectorReads, minSeekForVectorReads, readVectoredpublic FTPInputStream(java.io.InputStream stream,
org.apache.commons.net.ftp.FTPClient client,
FileSystem.Statistics stats)
public long getPos()
throws java.io.IOException
FSInputStreamgetPos in interface SeekablegetPos in class FSInputStreamjava.io.IOException - raised on errors performing I/O.public void seek(long pos)
throws java.io.IOException
FSInputStreamseek in interface Seekableseek in class FSInputStreampos - offset from the start of the file.java.io.IOException - raised on errors performing I/O.public boolean seekToNewSource(long targetPos)
throws java.io.IOException
FSInputStreamseekToNewSource in interface SeekableseekToNewSource in class FSInputStreamtargetPos - target position.java.io.IOException - raised on errors performing I/O.public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] buf,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeableclose in class java.io.InputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.InputStreampublic void mark(int readLimit)
mark in class java.io.InputStreampublic void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.