Class RegularFile
java.lang.Object
ecmwf.common.technical.GenericFile
ecmwf.common.technical.RegularFile
-
Nested Class Summary
Nested classes/interfaces inherited from class ecmwf.common.technical.GenericFile
GenericFile.IncorrectFileSize, GenericFile.IncorrectTransmittedSize, GenericFile.UnexpectedFileSize
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canRead()
Can read.boolean
canWrite()
Can write.boolean
delete()
Delete.boolean
exists()
Exists.Gets the absolute path.getFile()
Gets the file.Gets the input stream.getName()
Gets the name.Gets the output stream.getOutputStream
(boolean append) Gets the output stream.Gets the parent.Gets the parent file.getPath()
Gets the path.boolean
Checks if is absolute.boolean
Checks if is directory.boolean
isFile()
Checks if is file.long
Last modified.long
length()
Length.String[]
list()
List.String[]
list
(GenericFileFilter filter) List.long
Gives the number of files included in the specified directory and sub-directories.List files.listFiles
(GenericFileFilter filter) List files.long
listSize()
Gives the total size of the files included in the specified directory and sub-directories.boolean
mkdir()
Mkdir.boolean
mkdirs()
Mkdirs.long
receiveFile
(InputStream in, long expectedBytesCount) Receive file.boolean
Rename to.boolean
setLastModified
(long time) Sets the last modified.boolean
Sets the read only.long
transmitFile
(OutputStream out, long offset) Transmit file.Methods inherited from class ecmwf.common.technical.GenericFile
delete, getGenericFile, getGenericFile, getGenericFile
-
Method Details
-
renameTo
Rename to. Rename to.- Specified by:
renameTo
in classGenericFile
- Parameters:
path
- the path- Returns:
- true, if successful
-
getParent
Gets the parent. Gets the parent.- Specified by:
getParent
in classGenericFile
- Returns:
- the parent
-
getName
Gets the name. Gets the name.- Specified by:
getName
in classGenericFile
- Returns:
- the name
-
isDirectory
public boolean isDirectory()Checks if is directory. Checks if is directory.- Specified by:
isDirectory
in classGenericFile
- Returns:
- true, if is directory
-
isFile
public boolean isFile()Checks if is file. Checks if is file.- Specified by:
isFile
in classGenericFile
- Returns:
- true, if is file
-
exists
public boolean exists()Exists. Exists.- Specified by:
exists
in classGenericFile
- Returns:
- true, if successful
-
getPath
Gets the path. Gets the path.- Specified by:
getPath
in classGenericFile
- Returns:
- the path
-
getAbsolutePath
Gets the absolute path. Gets the absolute path.- Specified by:
getAbsolutePath
in classGenericFile
- Returns:
- the absolute path
-
getParentFile
Gets the parent file. Gets the parent file.- Specified by:
getParentFile
in classGenericFile
- Returns:
- the parent file
-
delete
public boolean delete()Delete. Delete.- Specified by:
delete
in classGenericFile
- Returns:
- true, if successful
-
canRead
public boolean canRead()Can read. Can read.- Specified by:
canRead
in classGenericFile
- Returns:
- true, if successful
-
canWrite
public boolean canWrite()Can write. Can write.- Specified by:
canWrite
in classGenericFile
- Returns:
- true, if successful
-
length
-
lastModified
Last modified. Last modified.- Specified by:
lastModified
in classGenericFile
- Returns:
- the long
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
setLastModified
public boolean setLastModified(long time) Sets the last modified. Sets the last modified.- Specified by:
setLastModified
in classGenericFile
- Parameters:
time
- the time- Returns:
- true, if successful
-
setReadOnly
public boolean setReadOnly()Sets the read only. Sets the read only.- Specified by:
setReadOnly
in classGenericFile
- Returns:
- true, if successful
-
mkdir
public boolean mkdir()Mkdir. Mkdir.- Specified by:
mkdir
in classGenericFile
- Returns:
- true, if successful
-
mkdirs
public boolean mkdirs()Mkdirs. Mkdirs.- Specified by:
mkdirs
in classGenericFile
- Returns:
- true, if successful
-
list
List. List.- Specified by:
list
in classGenericFile
- Parameters:
filter
- the filter- Returns:
- the string[]
-
listFiles
List files. List files.- Specified by:
listFiles
in classGenericFile
- Parameters:
filter
- the filter- Returns:
- the generic file[]
-
isAbsolute
public boolean isAbsolute()Checks if is absolute. Checks if is absolute.- Specified by:
isAbsolute
in classGenericFile
- Returns:
- true, if is absolute
-
getFile
Gets the file. Gets the file.- Specified by:
getFile
in classGenericFile
- Returns:
- the file
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
list
-
listCount
Gives the number of files included in the specified directory and sub-directories. List count.- Specified by:
listCount
in classGenericFile
- Returns:
- the long
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
listSize
Gives the total size of the files included in the specified directory and sub-directories. List size.- Specified by:
listSize
in classGenericFile
- Returns:
- the long
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
listFiles
List files. List files.- Specified by:
listFiles
in classGenericFile
- Returns:
- the generic file[]
-
getInputStream
Gets the input stream. Gets the input stream.- Specified by:
getInputStream
in classGenericFile
- Returns:
- the input stream
- Throws:
FileNotFoundException
-
getOutputStream
Gets the output stream. Gets the output stream.- Specified by:
getOutputStream
in classGenericFile
- Returns:
- the output stream
- Throws:
FileNotFoundException
-
getOutputStream
Gets the output stream. Gets the output stream.- Specified by:
getOutputStream
in classGenericFile
- Parameters:
append
- the append- Returns:
- the output stream
- Throws:
FileNotFoundException
-
transmitFile
Transmit file. Transmit file.- Specified by:
transmitFile
in classGenericFile
- Parameters:
out
- the outoffset
- the offset- Returns:
- the long
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
receiveFile
Receive file. Receive file.- Specified by:
receiveFile
in classGenericFile
- Parameters:
in
- the inexpectedBytesCount
- the size- Returns:
- the long
- Throws:
IOException
- Signals that an I/O exception has occurred.
-