Class RamFileData
- java.lang.Object
-
- org.apache.commons.vfs2.provider.ram.RamFileData
-
- All Implemented Interfaces:
java.io.Serializable
class RamFileData extends java.lang.Object implements java.io.Serializable
RAM File Object Data.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Collection<RamFileData>
children
Childrenprivate byte[]
content
Bytes.private long
lastModifiedMillis
Last modified timeprivate FileName
name
File Name.private static long
serialVersionUID
serialVersionUID format is YYYYMMDD for the date of the last binary change.private FileType
type
File Type.
-
Constructor Summary
Constructors Constructor Description RamFileData(FileName name)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
addChild(RamFileData data)
Add a child.(package private) void
clear()
boolean
equals(java.lang.Object o)
(package private) java.util.Collection<RamFileData>
getChildren()
(package private) byte[]
getContent()
(package private) long
getLastModified()
(package private) FileName
getName()
(package private) FileType
getType()
(package private) boolean
hasChildren(RamFileData data)
int
hashCode()
(package private) void
removeChild(RamFileData data)
Remove a child.(package private) void
resize(long newSize)
Resize the buffer(package private) void
setContent(byte[] content)
(package private) void
setLastModified(long lastModified)
(package private) void
setType(FileType type)
(package private) int
size()
java.lang.String
toString()
(package private) void
updateLastModified()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
serialVersionUID format is YYYYMMDD for the date of the last binary change.- See Also:
- Constant Field Values
-
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 java.util.Collection<RamFileData> children
Children
-
-
Constructor Detail
-
RamFileData
public RamFileData(FileName name)
Constructor.- Parameters:
name
- The file name.
-
-
Method Detail
-
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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.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
java.util.Collection<RamFileData> getChildren()
- Returns:
- Returns the children.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.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.
-
-