Class AbstractUsbFile

  • All Implemented Interfaces:
    UsbFile, java.io.Closeable, java.lang.AutoCloseable
    Direct Known Subclasses:
    FatDirectory, FatFile

    public abstract class AbstractUsbFile
    extends java.lang.Object
    implements UsbFile
    Created by magnusja on 3/1/17.
    • Constructor Detail

      • AbstractUsbFile

        public AbstractUsbFile()
    • Method Detail

      • search

        public UsbFile search​(java.lang.String path)
                       throws java.io.IOException
        Description copied from interface: UsbFile
        Tries to search a corresponding entry associated with the path parameter. Path separator is '/'. Parameter path must not start with an '/' (except if querying from root directory). Path is treated relative to current UsbFile.
        Specified by:
        search in interface UsbFile
        Parameters:
        path - The path to the resource to search.
        Returns:
        UsbFile directory or file if found, null otherwise.
        Throws:
        java.io.IOException
      • getAbsolutePath

        public java.lang.String getAbsolutePath()
        Description copied from interface: UsbFile
        Absolute path of a file or directory.
        Specified by:
        getAbsolutePath in interface UsbFile
        Returns:
        Absolute path seperated with '/' and beginning with an '/'
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object