public abstract static class WorkingTreeIterator.Entry
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) byte[] |
encodedName |
(package private) int |
encodedNameLen |
Constructor and Description |
---|
Entry() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
encodeName(java.nio.charset.CharsetEncoder enc) |
abstract long |
getLastModified()
Deprecated.
use
getLastModifiedInstant() instead |
abstract java.time.Instant |
getLastModifiedInstant()
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() |
void encodeName(java.nio.charset.CharsetEncoder enc)
public java.lang.String toString()
toString
in class java.lang.Object
public abstract FileMode getMode()
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.
FileMode
.public abstract long getLength()
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.
@Deprecated public abstract long getLastModified()
getLastModifiedInstant()
insteadNote: 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.
public abstract java.time.Instant getLastModifiedInstant()
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.
public abstract java.lang.String getName()
Efficient implementations are not required. The caller will obtain the name only once and cache it once obtained.
public abstract java.io.InputStream openInputStream() throws java.io.IOException
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.
java.io.IOException
- the file could not be opened for reading.