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) |
Modifier and Type | Method and Description |
---|---|
long |
getLength() |
Iterator<ByteBuffer> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public PathContentProvider(Path filePath) throws IOException
IOException
public PathContentProvider(Path filePath, int bufferSize) throws IOException
IOException
public long getLength()
getLength
in interface ContentProvider
public Iterator<ByteBuffer> iterator()
iterator
in interface Iterable<ByteBuffer>
Copyright © 1995-2019 Mort Bay Consulting. All Rights Reserved.