public class FilePathSplit extends FilePathWrapper
Constructor and Description |
---|
FilePathSplit() |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Delete a file or directory if it exists.
|
protected String |
getPrefix() |
String |
getScheme()
Get the scheme (prefix) for this file provider.
|
long |
lastModified()
Get the last modified date of a file
|
void |
moveTo(FilePath path)
Rename a file if this is allowed.
|
ArrayList<FilePath> |
newDirectoryStream()
List the files and directories in the given directory.
|
InputStream |
newInputStream()
Create an input stream to read from the file.
|
OutputStream |
newOutputStream(boolean append)
Create an output stream to write into the file.
|
FileChannel |
open(String mode)
Open a random access file object.
|
boolean |
setReadOnly()
Disable the ability to write.
|
long |
size()
Get the size of a file in bytes
|
FilePath |
unwrap(String fileName)
Get the base path for the given wrapped path.
|
canWrite, createDirectory, createFile, createTempFile, exists, getBase, getParent, getPath, isAbsolute, isDirectory, toRealPath, unwrap, wrap
get, getName, getNextTempFileNamePart, register, toString, unregister
protected String getPrefix()
getPrefix
in class FilePathWrapper
public FilePath unwrap(String fileName)
FilePathWrapper
unwrap
in class FilePathWrapper
fileName
- the path including the scheme prefixpublic boolean setReadOnly()
FilePath
setReadOnly
in class FilePathWrapper
public void delete()
FilePath
delete
in class FilePathWrapper
public long lastModified()
FilePath
lastModified
in class FilePathWrapper
public long size()
FilePath
size
in class FilePathWrapper
public ArrayList<FilePath> newDirectoryStream()
FilePath
newDirectoryStream
in class FilePathWrapper
public InputStream newInputStream() throws IOException
FilePath
newInputStream
in class FilePathWrapper
IOException
public FileChannel open(String mode) throws IOException
FilePath
open
in class FilePathWrapper
mode
- the access mode. Supported are r, rw, rws, rwdIOException
public OutputStream newOutputStream(boolean append)
FilePath
newOutputStream
in class FilePathWrapper
append
- if true, the file will grow, if false, the file will be
truncated firstpublic void moveTo(FilePath path)
FilePath
moveTo
in class FilePathWrapper
path
- the new fully qualified file nameCopyright © 2012 JBoss by Red Hat. All Rights Reserved.