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 TypeMethodDescriptionbooleancanRead()Can read.booleancanWrite()Can write.booleandelete()Delete.booleanexists()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.booleanChecks if is absolute.booleanChecks if is directory.booleanisFile()Checks if is file.longLast modified.longlength()Length.String[]list()List.String[]list(GenericFileFilter filter) List.longGives the number of files included in the specified directory and sub-directories.List files.listFiles(GenericFileFilter filter) List files.longlistSize()Gives the total size of the files included in the specified directory and sub-directories.booleanmkdir()Mkdir.booleanmkdirs()Mkdirs.longreceiveFile(InputStream in, long expectedBytesCount) Receive file.booleanRename to.booleansetLastModified(long time) Sets the last modified.booleanSets the read only.longtransmitFile(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:
renameToin classGenericFile- Parameters:
path- the path- Returns:
- true, if successful
-
getParent
Gets the parent. Gets the parent.- Specified by:
getParentin classGenericFile- Returns:
- the parent
-
getName
Gets the name. Gets the name.- Specified by:
getNamein classGenericFile- Returns:
- the name
-
isDirectory
public boolean isDirectory()Checks if is directory. Checks if is directory.- Specified by:
isDirectoryin classGenericFile- Returns:
- true, if is directory
-
isFile
public boolean isFile()Checks if is file. Checks if is file.- Specified by:
isFilein classGenericFile- Returns:
- true, if is file
-
exists
public boolean exists()Exists. Exists.- Specified by:
existsin classGenericFile- Returns:
- true, if successful
-
getPath
Gets the path. Gets the path.- Specified by:
getPathin classGenericFile- Returns:
- the path
-
getAbsolutePath
Gets the absolute path. Gets the absolute path.- Specified by:
getAbsolutePathin classGenericFile- Returns:
- the absolute path
-
getParentFile
Gets the parent file. Gets the parent file.- Specified by:
getParentFilein classGenericFile- Returns:
- the parent file
-
delete
public boolean delete()Delete. Delete.- Specified by:
deletein classGenericFile- Returns:
- true, if successful
-
canRead
public boolean canRead()Can read. Can read.- Specified by:
canReadin classGenericFile- Returns:
- true, if successful
-
canWrite
public boolean canWrite()Can write. Can write.- Specified by:
canWritein classGenericFile- Returns:
- true, if successful
-
length
-
lastModified
Last modified. Last modified.- Specified by:
lastModifiedin 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:
setLastModifiedin classGenericFile- Parameters:
time- the time- Returns:
- true, if successful
-
setReadOnly
public boolean setReadOnly()Sets the read only. Sets the read only.- Specified by:
setReadOnlyin classGenericFile- Returns:
- true, if successful
-
mkdir
public boolean mkdir()Mkdir. Mkdir.- Specified by:
mkdirin classGenericFile- Returns:
- true, if successful
-
mkdirs
public boolean mkdirs()Mkdirs. Mkdirs.- Specified by:
mkdirsin classGenericFile- Returns:
- true, if successful
-
list
List. List.- Specified by:
listin classGenericFile- Parameters:
filter- the filter- Returns:
- the string[]
-
listFiles
List files. List files.- Specified by:
listFilesin classGenericFile- Parameters:
filter- the filter- Returns:
- the generic file[]
-
isAbsolute
public boolean isAbsolute()Checks if is absolute. Checks if is absolute.- Specified by:
isAbsolutein classGenericFile- Returns:
- true, if is absolute
-
getFile
Gets the file. Gets the file.- Specified by:
getFilein 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:
listCountin 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:
listSizein classGenericFile- Returns:
- the long
- Throws:
IOException- Signals that an I/O exception has occurred.
-
listFiles
List files. List files.- Specified by:
listFilesin classGenericFile- Returns:
- the generic file[]
-
getInputStream
Gets the input stream. Gets the input stream.- Specified by:
getInputStreamin classGenericFile- Returns:
- the input stream
- Throws:
FileNotFoundException
-
getOutputStream
Gets the output stream. Gets the output stream.- Specified by:
getOutputStreamin classGenericFile- Returns:
- the output stream
- Throws:
FileNotFoundException
-
getOutputStream
Gets the output stream. Gets the output stream.- Specified by:
getOutputStreamin classGenericFile- Parameters:
append- the append- Returns:
- the output stream
- Throws:
FileNotFoundException
-
transmitFile
Transmit file. Transmit file.- Specified by:
transmitFilein 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:
receiveFilein classGenericFile- Parameters:
in- the inexpectedBytesCount- the size- Returns:
- the long
- Throws:
IOException- Signals that an I/O exception has occurred.
-