public class FileRegion extends Object implements Closeable
| 构造器和说明 |
|---|
FileRegion(File file) |
FileRegion(File file,
long position,
long length) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
File |
getFile() |
FileChannel |
getFileChannel() |
long |
getLength() |
long |
getPosition() |
boolean |
isRandomAccess() |
long |
transferTo(Callback callback,
BufferReaderHandler handler) |
public FileRegion(File file) throws FileNotFoundException
public FileRegion(File file, long position, long length) throws FileNotFoundException
public long getPosition()
public long getLength()
public FileChannel getFileChannel() throws IOException
IOExceptionpublic boolean isRandomAccess()
public File getFile()
public long transferTo(Callback callback, BufferReaderHandler handler) throws IOException
IOExceptionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionCopyright © 2016. All rights reserved.