de.esprit.common.io

## Class FileInfo

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.common.util.TransferableObject
    - - de.esprit.common.io.FileInfo

- All Implemented Interfaces:
    Renderable, DeepCloneable, Dumpable, java.io.Serializable, java.lang.Cloneable
  Direct Known Subclasses:
    ByteArrayFileInfo, LocalFileInfo, ResourceInfo, TarEntryInfo, UrlFileInfo, ZipEntryInfo

      public abstract class FileInfo
      extends TransferableObject
      implements Renderable

  This class encapsulates file information which is read from files. It is used for exchanging file info between client and server.
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.String` | `absolutePath`
    `protected FileDataType` | `dataType`
    `protected FileType` | `fileType`
    `protected boolean` | `isDirectory`
    `protected boolean` | `isExisting`
    `protected long` | `lastModified`
    `protected long` | `length`
    `protected java.lang.String` | `relBasePath`
    `protected java.io.File` | `rootDir`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `FileInfo(java.lang.String fileName)`
    `protected` | `FileInfo(java.lang.String fileName, FileDataType dataType)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `java.lang.String` | `getAbsolutePath()`
    `java.lang.String` | `getBasePath()`
    `FileDataType` | `getDataType()`
    `java.lang.String` | `getFileName()`
    `FileType` | `getFileType()`
    `long` | `getLastModified()`
    `long` | `getLength()`
    `java.awt.Color` | `getRenderColor()`
    `javax.swing.Icon` | `getRenderIcon()`
    `java.lang.String` | `getRenderText()`
    `boolean` | `isAscii()`
    `boolean` | `isBinary()`
    `boolean` | `isDirectory()`
    `boolean` | `isExisting()`
    `boolean` | `isFile()`
    `DumpString` | `toDumpString(DumpString s)` This method allows subclasses to add values to the existing DumpString of the superclass.
    `ToString` | `toString(ToString s)` This method allows subclasses to add values to the existing ToString of the superclass.

    - ### Methods inherited from class de.esprit.common.util.TransferableObject

      `clone, deepClone`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### rootDir

          protected java.io.File rootDir

    - #### relBasePath

          protected java.lang.String relBasePath

    - #### absolutePath

          protected java.lang.String absolutePath

    - #### fileType

          protected FileType fileType

    - #### dataType

          protected FileDataType dataType

    - #### isExisting

          protected boolean isExisting

    - #### isDirectory

          protected boolean isDirectory

    - #### length

          protected long length

    - #### lastModified

          protected long lastModified

  - ### Constructor Detail

    - #### FileInfo

          protected FileInfo(java.lang.String fileName)

    - #### FileInfo

          protected FileInfo(java.lang.String fileName,
                  FileDataType dataType)

  - ### Method Detail

    - #### getFileType

          public final FileType getFileType()

    - #### getLastModified

          public final long getLastModified()

    - #### getDataType

          public final FileDataType getDataType()

    - #### isAscii

          public final boolean isAscii()

    - #### isBinary

          public final boolean isBinary()

    - #### isExisting

          public final boolean isExisting()

    - #### getFileName

          public final java.lang.String getFileName()

    - #### getBasePath

          public final java.lang.String getBasePath()

    - #### getAbsolutePath

          public final java.lang.String getAbsolutePath()

    - #### isDirectory

          public boolean isDirectory()

    - #### isFile

          public boolean isFile()

    - #### getLength

          public long getLength()

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### getRenderColor

          public java.awt.Color getRenderColor()

      Specified by:
        `getRenderColor` in interface `Renderable`

    - #### getRenderText

          public java.lang.String getRenderText()

      Specified by:
        `getRenderText` in interface `Renderable`

    - #### getRenderIcon

          public final javax.swing.Icon getRenderIcon()

      Specified by:
        `getRenderIcon` in interface `Renderable`

    - #### toString

          public ToString toString(ToString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing ToString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toString` in interface `Dumpable`
      Overrides:
        `toString` in class `DumpableObject`

    - #### toDumpString

          public DumpString toDumpString(DumpString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing DumpString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toDumpString` in interface `Dumpable`
      Overrides:
        `toDumpString` in class `DumpableObject`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.