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.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 |
|---|
FileOrigin(File 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 FileOrigin(File origin)
origin - The origin, not null.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>