public class PathContentProvider extends Object implements ContentProvider
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.| Constructor and Description |
|---|
PathContentProvider(Path filePath) |
PathContentProvider(Path filePath,
int bufferSize) |
public PathContentProvider(Path filePath) throws IOException
IOExceptionpublic PathContentProvider(Path filePath, int bufferSize) throws IOException
IOExceptionpublic long getLength()
getLength in interface ContentProviderpublic Iterator<ByteBuffer> iterator()
iterator in interface Iterable<ByteBuffer>Copyright © 1995-2014 Mort Bay Consulting. All Rights Reserved.