Class RegularFile

java.lang.Object
ecmwf.common.technical.GenericFile
ecmwf.common.technical.RegularFile

public final class RegularFile extends GenericFile
The Class RegularFile.
  • Method Details

    • renameTo

      public boolean renameTo(String path)
      Rename to. Rename to.
      Specified by:
      renameTo in class GenericFile
      Parameters:
      path - the path
      Returns:
      true, if successful
    • getParent

      public String getParent()
      Gets the parent. Gets the parent.
      Specified by:
      getParent in class GenericFile
      Returns:
      the parent
    • getName

      public String getName()
      Gets the name. Gets the name.
      Specified by:
      getName in class GenericFile
      Returns:
      the name
    • isDirectory

      public boolean isDirectory()
      Checks if is directory. Checks if is directory.
      Specified by:
      isDirectory in class GenericFile
      Returns:
      true, if is directory
    • isFile

      public boolean isFile()
      Checks if is file. Checks if is file.
      Specified by:
      isFile in class GenericFile
      Returns:
      true, if is file
    • exists

      public boolean exists()
      Exists. Exists.
      Specified by:
      exists in class GenericFile
      Returns:
      true, if successful
    • getPath

      public String getPath()
      Gets the path. Gets the path.
      Specified by:
      getPath in class GenericFile
      Returns:
      the path
    • getAbsolutePath

      public String getAbsolutePath()
      Gets the absolute path. Gets the absolute path.
      Specified by:
      getAbsolutePath in class GenericFile
      Returns:
      the absolute path
    • getParentFile

      public GenericFile getParentFile()
      Gets the parent file. Gets the parent file.
      Specified by:
      getParentFile in class GenericFile
      Returns:
      the parent file
    • delete

      public boolean delete()
      Delete. Delete.
      Specified by:
      delete in class GenericFile
      Returns:
      true, if successful
    • canRead

      public boolean canRead()
      Can read. Can read.
      Specified by:
      canRead in class GenericFile
      Returns:
      true, if successful
    • canWrite

      public boolean canWrite()
      Can write. Can write.
      Specified by:
      canWrite in class GenericFile
      Returns:
      true, if successful
    • length

      public long length()
      Length. Length.
      Specified by:
      length in class GenericFile
      Returns:
      the long
    • lastModified

      public long lastModified() throws IOException
      Last modified. Last modified.
      Specified by:
      lastModified in class GenericFile
      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 class GenericFile
      Parameters:
      time - the time
      Returns:
      true, if successful
    • setReadOnly

      public boolean setReadOnly()
      Sets the read only. Sets the read only.
      Specified by:
      setReadOnly in class GenericFile
      Returns:
      true, if successful
    • mkdir

      public boolean mkdir()
      Mkdir. Mkdir.
      Specified by:
      mkdir in class GenericFile
      Returns:
      true, if successful
    • mkdirs

      public boolean mkdirs()
      Mkdirs. Mkdirs.
      Specified by:
      mkdirs in class GenericFile
      Returns:
      true, if successful
    • list

      public String[] list(GenericFileFilter filter)
      List. List.
      Specified by:
      list in class GenericFile
      Parameters:
      filter - the filter
      Returns:
      the string[]
    • listFiles

      public GenericFile[] listFiles(GenericFileFilter filter)
      List files. List files.
      Specified by:
      listFiles in class GenericFile
      Parameters:
      filter - the filter
      Returns:
      the generic file[]
    • isAbsolute

      public boolean isAbsolute()
      Checks if is absolute. Checks if is absolute.
      Specified by:
      isAbsolute in class GenericFile
      Returns:
      true, if is absolute
    • getFile

      public File getFile() throws IOException
      Gets the file. Gets the file.
      Specified by:
      getFile in class GenericFile
      Returns:
      the file
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • list

      public String[] list()
      List. List.
      Specified by:
      list in class GenericFile
      Returns:
      the string[]
    • listCount

      public long listCount() throws IOException
      Gives the number of files included in the specified directory and sub-directories. List count.
      Specified by:
      listCount in class GenericFile
      Returns:
      the long
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • listSize

      public long listSize() throws IOException
      Gives the total size of the files included in the specified directory and sub-directories. List size.
      Specified by:
      listSize in class GenericFile
      Returns:
      the long
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • listFiles

      public GenericFile[] listFiles()
      List files. List files.
      Specified by:
      listFiles in class GenericFile
      Returns:
      the generic file[]
    • getInputStream

      public InputStream getInputStream() throws FileNotFoundException
      Gets the input stream. Gets the input stream.
      Specified by:
      getInputStream in class GenericFile
      Returns:
      the input stream
      Throws:
      FileNotFoundException
    • getOutputStream

      public OutputStream getOutputStream() throws FileNotFoundException
      Gets the output stream. Gets the output stream.
      Specified by:
      getOutputStream in class GenericFile
      Returns:
      the output stream
      Throws:
      FileNotFoundException
    • getOutputStream

      public OutputStream getOutputStream(boolean append) throws FileNotFoundException
      Gets the output stream. Gets the output stream.
      Specified by:
      getOutputStream in class GenericFile
      Parameters:
      append - the append
      Returns:
      the output stream
      Throws:
      FileNotFoundException
    • transmitFile

      public long transmitFile(OutputStream out, long offset) throws IOException
      Transmit file. Transmit file.
      Specified by:
      transmitFile in class GenericFile
      Parameters:
      out - the out
      offset - the offset
      Returns:
      the long
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • receiveFile

      public long receiveFile(InputStream in, long expectedBytesCount) throws IOException
      Receive file. Receive file.
      Specified by:
      receiveFile in class GenericFile
      Parameters:
      in - the in
      expectedBytesCount - the size
      Returns:
      the long
      Throws:
      IOException - Signals that an I/O exception has occurred.