Class RamFileData

java.lang.Object
org.apache.commons.vfs2.provider.ram.RamFileData
All Implemented Interfaces:
Serializable

class RamFileData extends Object implements Serializable
RAM File Object Data.
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      serialVersionUID format is YYYYMMDD for the date of the last binary change.
      See Also:
    • name

      private FileName name
      File Name.
    • type

      private FileType type
      File Type.
    • content

      private byte[] content
      Bytes.
    • lastModifiedMillis

      private long lastModifiedMillis
      Last modified time
    • children

      private final Collection<RamFileData> children
      Children
  • Constructor Details

    • RamFileData

      public RamFileData(FileName name)
      Constructor.
      Parameters:
      name - The file name.
  • Method Details

    • getContent

      byte[] getContent()
      Returns:
      Returns the buffer.
    • setContent

      void setContent(byte[] content)
      Parameters:
      content - The buffer.
    • getLastModified

      long getLastModified()
      Returns:
      Returns the lastModified.
    • setLastModified

      void setLastModified(long lastModified)
      Parameters:
      lastModified - The lastModified to set.
    • getType

      FileType getType()
      Returns:
      Returns the type.
    • setType

      void setType(FileType type)
      Parameters:
      type - The type to set.
    • clear

      void clear()
    • updateLastModified

      void updateLastModified()
    • getName

      FileName getName()
      Returns:
      Returns the name.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • addChild

      void addChild(RamFileData data) throws FileSystemException
      Add a child.
      Parameters:
      data - The file data.
      Throws:
      FileSystemException - if an error occurs.
    • removeChild

      void removeChild(RamFileData data) throws FileSystemException
      Remove a child.
      Parameters:
      data - The file data.
      Throws:
      FileSystemException - if an error occurs.
    • getChildren

      Collection<RamFileData> getChildren()
      Returns:
      Returns the children.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • hasChildren

      boolean hasChildren(RamFileData data)
    • size

      int size()
      Returns:
      Returns the size of the buffer
    • resize

      void resize(long newSize)
      Resize the buffer
      Parameters:
      newSize - The new buffer size.