class RamFileData
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private java.util.Collection<RamFileData> |
children
Children
|
private byte[] |
content
Bytes.
|
(package private) static byte[] |
EMPTY |
private long |
lastModified
Last modified time
|
private 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 and Description |
---|
RamFileData(FileName name)
Constructor.
|
Modifier and Type | Method and 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() |
static final byte[] EMPTY
private static final long serialVersionUID
private FileName name
private FileType type
private byte[] content
private long lastModified
private final java.util.Collection<RamFileData> children
public RamFileData(FileName name)
name
- The file name.byte[] getContent()
void setContent(byte[] content)
content
- The buffer.long getLastModified()
void setLastModified(long lastModified)
lastModified
- The lastModified to set.FileType getType()
void setType(FileType type)
type
- The type to set.void clear()
void updateLastModified()
FileName getName()
public java.lang.String toString()
toString
in class java.lang.Object
void addChild(RamFileData data) throws FileSystemException
data
- The file data.FileSystemException
- if an error occurs.void removeChild(RamFileData data) throws FileSystemException
data
- The file data.FileSystemException
- if an error occurs.java.util.Collection<RamFileData> getChildren()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
boolean hasChildren(RamFileData data)
int size()
void resize(long newSize)
newSize
- The new buffer size.