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.ByteArrayOrigin, AbstractOrigin.CharSequenceOrigin, AbstractOrigin.FileOrigin, AbstractOrigin.InputStreamOrigin, AbstractOrigin.OutputStreamOrigin, AbstractOrigin.PathOrigin, AbstractOrigin.ReaderOrigin, AbstractOrigin.URIOrigin, AbstractOrigin.WriterOrigin| 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 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, getReader, getWriter, size, toStringasThisclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitasSupplierpublic PathOrigin(Path origin)
origin - The origin.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>Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.