Class BinFileInput<T>

  • All Implemented Interfaces:
    FileInput<T>, FileIo, Input<T>, java.lang.AutoCloseable, java.util.function.Supplier<T>

    public class BinFileInput<T>
    extends BinInput<T>
    implements FileInput<T>
    An item input implementation deserializing something from the specified file.
    • Field Detail

      • srcPath

        protected final java.nio.file.Path srcPath
    • Constructor Detail

      • BinFileInput

        public BinFileInput​(java.nio.file.Path srcPath)
        Parameters:
        srcPath - the path to the file which should be used to restore the serialized items
        Throws:
        java.io.IOException - if unable to open the file for reading
    • Method Detail

      • buildObjectInputStream

        protected static java.io.ObjectInputStream buildObjectInputStream​(java.nio.file.Path itemsSrcPath)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class BinInput<T>
      • filePath

        public final java.nio.file.Path filePath()
        Specified by:
        filePath in interface FileIo
      • reset

        public void reset()
        Description copied from interface: Input
        Reset this input making this readable from the beginning
        Specified by:
        reset in interface Input<T>
        Overrides:
        reset in class BinInput<T>