public static class AbstractOrigin.PathOrigin extends AbstractOrigin<Path,AbstractOrigin.PathOrigin>
Path origin.
Starting from this origin, you can get a byte array, a file, an input stream, an output stream, a path, a reader, and a writer.
AbstractOrigin.AbstractRandomAccessFileOrigin<T extends RandomAccessFile,B extends AbstractOrigin.AbstractRandomAccessFileOrigin<T,B>>, AbstractOrigin.ByteArrayOrigin, AbstractOrigin.CharSequenceOrigin, AbstractOrigin.FileOrigin, AbstractOrigin.InputStreamOrigin, AbstractOrigin.IORandomAccessFileOrigin, AbstractOrigin.OutputStreamOrigin, AbstractOrigin.PathOrigin, AbstractOrigin.RandomAccessFileOrigin, AbstractOrigin.ReaderOrigin, AbstractOrigin.URIOrigin, AbstractOrigin.WriterOriginorigin| Constructor and Description |
|---|
PathOrigin(Path origin)
Constructs a new instance for the given origin.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getByteArray(long position,
int length)
Gets a portion of this origin as a byte array, if possible.
|
File |
getFile()
Gets this origin as a Path, if possible.
|
Path |
getPath()
Gets this origin as a Path, if possible.
|
get, getByteArray, getCharSequence, getInputStream, getOutputStream, getRandomAccessFile, getReader, getWriter, size, toStringasThisclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitasSupplier, getUncheckedpublic PathOrigin(Path origin)
origin - The origin, not null.public byte[] getByteArray(long position,
int length)
throws IOException
AbstractOrigingetByteArray in class AbstractOrigin<Path,AbstractOrigin.PathOrigin>position - the initial index of the range to be copied, inclusive.length - How many bytes to copy.IOException - if an I/O error occurs.public File getFile()
AbstractOrigingetFile in class AbstractOrigin<Path,AbstractOrigin.PathOrigin>public Path getPath()
AbstractOrigingetPath in class AbstractOrigin<Path,AbstractOrigin.PathOrigin>