Class 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.

    • Method Detail

      • mark

        public void mark​(int readlimit)
        Overrides:
        mark in class InputStream
      • duplicate

        public InputStream duplicate()
        Specified by:
        duplicate in interface com.oracle.bmc.http.client.io.DuplicatableInputStream
      • create

        public 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.
      • getSourceFile

        public File getSourceFile()