public class FileInfo
extends java.lang.Object
implements java.io.Externalizable
This class makes it easy to obtain information about a file on one system and then transfer that information to another system.
Modifier and Type | Field and Description |
---|---|
long |
creation
Creation date and time.
|
java.lang.String |
fullname
Canonicalized absolute path name.
|
long |
modification
Last modification date and time.
|
java.lang.String |
name
File name as specified on input.
|
java.lang.String |
pathname
Absolute path if the input file name was specified in absolute terms or
the relative path name if the file was found via the PROPATH.
|
long |
size
File size in bytes.
|
java.lang.String |
type
File type codes.
|
Constructor and Description |
---|
FileInfo()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
void |
writeExternal(java.io.ObjectOutput out)
Replacement for the default object writing method.
|
public java.lang.String name
public java.lang.String pathname
public java.lang.String fullname
public long size
public java.lang.String type
public long modification
public long creation
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- The output destination to which fields will be saved.java.io.IOException
- In case of I/O errors.public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- Input source from which fields will be restored.java.io.IOException
- In case of I/O errors.java.lang.ClassNotFoundException
- If payload can't be instantiated.