Class WorkingTreeIterator.Entry

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Entry()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract long getLastModified()
      Get the last modified time of this entry.
      abstract long getLength()
      Get the byte length of this entry.
      abstract FileMode getMode()
      Get the type of this entry.
      abstract java.lang.String getName()
      Get the name of this entry within its directory.
      abstract java.io.InputStream openInputStream()
      Obtain an input stream to read the file content.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Entry

        protected Entry()
    • Method Detail

      • toString

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

        public abstract FileMode getMode()
        Get the type of this entry.

        Note: Efficient implementation required.

        The implementation of this method must be efficient. If a subclass needs to compute the value they should cache the reference within an instance member instead.

        Returns:
        a file mode constant from FileMode.
      • getLength

        public abstract long getLength()
        Get the byte length of this entry.

        Note: Efficient implementation required.

        The implementation of this method must be efficient. If a subclass needs to compute the value they should cache the reference within an instance member instead.

        Returns:
        size of this file, in bytes.
      • getLastModified

        public abstract long getLastModified()
        Get the last modified time of this entry.

        Note: Efficient implementation required.

        The implementation of this method must be efficient. If a subclass needs to compute the value they should cache the reference within an instance member instead.

        Returns:
        time since the epoch (in ms) of the last change.
      • getName

        public abstract java.lang.String getName()
        Get the name of this entry within its directory.

        Efficient implementations are not required. The caller will obtain the name only once and cache it once obtained.

        Returns:
        name of the entry.
      • openInputStream

        public abstract java.io.InputStream openInputStream()
                                                     throws java.io.IOException
        Obtain an input stream to read the file content.

        Efficient implementations are not required. The caller will usually obtain the stream only once per entry, if at all.

        The input stream should not use buffering if the implementation can avoid it. The caller will buffer as necessary to perform efficient block IO operations.

        The caller will close the stream once complete.

        Returns:
        a stream to read from the file.
        Throws:
        java.io.IOException - the file could not be opened for reading.