Package com.oracle.bmc.io.internal
Class WrappedFileInputStream
- java.lang.Object
- 
- java.io.InputStream
- 
- java.io.FileInputStream
- 
- com.oracle.bmc.io.internal.WrappedFileInputStream
 
 
 
- 
- All Implemented Interfaces:
- com.oracle.bmc.http.client.io.DuplicatableInputStream,- Closeable,- AutoCloseable
 
 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 SummaryConstructors Constructor Description WrappedFileInputStream(File file)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WrappedFileInputStreamcreate(File file)Same as calling the ctor, except will throw an unchecked IllegalArgumentException if the file isn’t found.InputStreamduplicate()FilegetSourceFile()voidmark(int readlimit)booleanmarkSupported()voidreset()- 
Methods inherited from class java.io.FileInputStreamavailable, close, finalize, getChannel, getFD, read, read, read, skip
 - 
Methods inherited from class java.io.InputStreamnullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
 
- 
 
- 
- 
- 
Constructor Detail- 
WrappedFileInputStreampublic WrappedFileInputStream(File file) throws FileNotFoundException - Throws:
- FileNotFoundException
 
 
- 
 - 
Method Detail- 
markSupportedpublic boolean markSupported() - Overrides:
- markSupportedin class- InputStream
 
 - 
markpublic void mark(int readlimit) - Overrides:
- markin class- InputStream
 
 - 
resetpublic void reset() throws IOException- Overrides:
- resetin class- InputStream
- Throws:
- IOException
 
 - 
duplicatepublic InputStream duplicate() - Specified by:
- duplicatein interface- com.oracle.bmc.http.client.io.DuplicatableInputStream
 
 - 
createpublic static WrappedFileInputStream create(File file) Same as calling the ctor, except will throw an unchecked IllegalArgumentException if the file isn’t found.- Parameters:
- file- the file to read from.
- Returns:
- a new stream.
 
 - 
getSourceFilepublic File getSourceFile() 
 
- 
 
-