public interface FileInfo
FileSelector.isSelected(FileInfo)
is invoked. This object provides information about
the file to select or deselect.Modifier and Type | Method and Description |
---|---|
InputStream |
getContents()
Creates an
InputStream , which may be used to read
the files contents. |
String |
getName()
Returns the resources name, which may include path components,
like directory names, or something like that.
|
boolean |
isDirectory()
Returns, whether the
FileInfo refers to a directory. |
boolean |
isFile()
Returns, whether the
FileInfo refers to a file. |
String getName()
File.pathSeparator
InputStream getContents() throws IOException
InputStream
, which may be used to read
the files contents. This is useful, if the file selector
comes to a decision based on the files contents.
Please note that this InputStream is unbuffered. Clients should wrap this in a
BufferedInputStream or attempt reading reasonably large chunks (8K+).IOException
boolean isFile()
FileInfo
refers to a file.boolean isDirectory()
FileInfo
refers to a directory.Copyright © 2001–2017 Codehaus. All rights reserved.