public class WrappedFileInputStream extends FileInputStream implements com.oracle.bmc.http.client.io.DuplicatableInputStream
Simple wrapper over FileInputStream that also exposes the File used to create the stream.
This version also support mark/reset.
Constructor and Description |
---|
WrappedFileInputStream(File file) |
Modifier and Type | Method and Description |
---|---|
static WrappedFileInputStream |
create(File file)
Same as calling the ctor, except will throw an unchecked IllegalArgumentException if the file
isn’t found.
|
InputStream |
duplicate() |
File |
getSourceFile() |
void |
mark(int readlimit) |
boolean |
markSupported() |
void |
reset() |
available, close, finalize, getChannel, getFD, read, read, read, skip
public WrappedFileInputStream(File file) throws FileNotFoundException
FileNotFoundException
public boolean markSupported()
markSupported
in class InputStream
public void mark(int readlimit)
mark
in class InputStream
public void reset() throws IOException
reset
in class InputStream
IOException
public InputStream duplicate()
duplicate
in interface com.oracle.bmc.http.client.io.DuplicatableInputStream
public static WrappedFileInputStream create(File file)
Same as calling the ctor, except will throw an unchecked IllegalArgumentException if the file isn’t found.
file
- the file to read from.public File getSourceFile()
Copyright © 2016–2024. All rights reserved.