public class PathContentProvider extends AbstractTypedContentProvider
A ContentProvider for files using JDK 7's java.nio.file APIs.
It is possible to specify, at the constructor, a buffer size used to read content from the stream, by default 4096 bytes.
ContentProvider.Typed| 构造器和说明 |
|---|
PathContentProvider(Path filePath) |
PathContentProvider(Path filePath,
int bufferSize) |
PathContentProvider(String contentType,
Path filePath) |
PathContentProvider(String contentType,
Path filePath,
int bufferSize) |
| 限定符和类型 | 方法和说明 |
|---|---|
long |
getLength() |
Iterator<ByteBuffer> |
iterator() |
getContentTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic PathContentProvider(Path filePath) throws IOException
IOExceptionpublic PathContentProvider(Path filePath, int bufferSize) throws IOException
IOExceptionpublic PathContentProvider(String contentType, Path filePath) throws IOException
IOExceptionpublic PathContentProvider(String contentType, Path filePath, int bufferSize) throws IOException
IOExceptionpublic long getLength()
public Iterator<ByteBuffer> iterator()
Copyright © 2017. All rights reserved.