public class PathContentProvider extends AbstractTypedContentProvider
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
Constructor and Description |
---|
PathContentProvider(Path filePath) |
PathContentProvider(Path filePath,
int bufferSize) |
PathContentProvider(String contentType,
Path filePath) |
PathContentProvider(String contentType,
Path filePath,
int bufferSize) |
Modifier and Type | Method and Description |
---|---|
long |
getLength() |
Iterator<ByteBuffer> |
iterator() |
getContentType
public PathContentProvider(Path filePath) throws IOException
IOException
public PathContentProvider(Path filePath, int bufferSize) throws IOException
IOException
public PathContentProvider(String contentType, Path filePath) throws IOException
IOException
public PathContentProvider(String contentType, Path filePath, int bufferSize) throws IOException
IOException
public long getLength()
public Iterator<ByteBuffer> iterator()
Copyright © 1995-2015 Webtide. All Rights Reserved.