public static class AbstractOrigin.FileOrigin extends AbstractOrigin<File,AbstractOrigin.FileOrigin>
File 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 |
|---|
FileOrigin(File 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 FileOrigin(File origin)
origin - The origin.public byte[] getByteArray(long position, int length) throws IOException
AbstractOrigingetByteArray in class AbstractOrigin<File,AbstractOrigin.FileOrigin>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<File,AbstractOrigin.FileOrigin>public Path getPath()
AbstractOrigingetPath in class AbstractOrigin<File,AbstractOrigin.FileOrigin>Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.